This commit is contained in:
parent
95bc11ae66
commit
04a093c576
1 changed files with 19 additions and 0 deletions
19
content/posts/2024-05-19.md
Normal file
19
content/posts/2024-05-19.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
+++
|
||||||
|
title = 2024-05-19
|
||||||
|
author = ["SouthFox"]
|
||||||
|
date = 2024-05-19T23:43:00+08:00
|
||||||
|
lastmod = 2024-05-19T23:59:42+08:00
|
||||||
|
tags = ["publish"]
|
||||||
|
draft = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
## Scheme 数据类型 {#scheme-数据类型}
|
||||||
|
|
||||||
|
在 [Scheme]({{< relref "../main/20240519235937-scheme.md" >}}) 里定义一个数据类型,声明它的构造函数……参数,以及判断方法,还有 set 方法
|
||||||
|
|
||||||
|
```scheme
|
||||||
|
(define-record-type <vec2>
|
||||||
|
(make-vec2 bv)
|
||||||
|
vec2?
|
||||||
|
(bv vec2-bv))
|
||||||
|
```
|
Loading…
Reference in a new issue