Skip to content

Tags: muqiuhan/MLisp

Tags

v0.2.0

Toggle v0.2.0's commit message
v0.2.0

\## NEW record syntax:

```
mlisp> (:= record-x (:: 'x (@ (| 'y 1) (| 'z 2))))
- : record = #<record:x
        (
                y: int = 1
                z: int = 2
        )>

mlisp> (:> record-x 'y)
- : int = 1

mlisp> (:> record-x 'z)
- : int = 2
```

\## NEW operator syntax:

- `setq` -> `==`:
```
mlisp> (setq x 1)
- : int = 1

mlisp> (:= x 1)
- : int = 1
```

- `list` -> `@`:
```
mlisp> (list 1 2 3)
- : pair = (1 2 3)

mlisp> (@ 1 2 3)
- : pair = (1 2 3)
```

- `pair` -> `|`:
```
mlisp> (pair 1 2)
- : pair = (1 . 2)

mlisp> (| 1 2)
- : pair = (1 . 2)
```

\## Some performance optimizations
Optimize the performance of some modules by introducing Janestreet Core
industrial standard library.