https://github.com/eudoxia0/l0
Linear Lisp
https://github.com/eudoxia0/l0
linear-types lisp sml standard-ml
Last synced: about 1 month ago
JSON representation
Linear Lisp
- Host: GitHub
- URL: https://github.com/eudoxia0/l0
- Owner: eudoxia0
- License: gpl-3.0
- Created: 2018-08-21T02:00:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-28T23:07:40.000Z (over 6 years ago)
- Last Synced: 2025-02-15T05:45:32.986Z (3 months ago)
- Topics: linear-types, lisp, sml, standard-ml
- Language: Standard ML
- Size: 407 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# L0
[](https://travis-ci.org/eudoxia0/l0)
A minimal Lisp with linear types. Not yet finished.
Example:
~~~bash
$ make l0
$ ./l0 examples/fib.lisp fib.cpp
$ g++ fib.cpp
$ ./a.out
fib(30) = 832040
~~~## Examples
Try running `make test` to compile and run the examples.
### Hello World
~~~lisp
(defun main () i32
(println "Hello, world!")
0)
~~~### Fibonacci
~~~lisp
(defun fib ((n i32)) i32
(if (< n 2)
n
(+ (fib (- n 1)) (fib (- n 2)))))
~~~## License
Copyright 2018 Fernando Borretti.
Licensed under the GPLv3 license. See the COPYING file for details.