Glisp
October 10, 2022 ยท View on GitHub
A tree-walking Lisp interpreter written in Gleam!
It features:
- Ints with
+,-,*, and/. - Bools with
not,and, andor. - Comparison with
=. - Lists with
empty,cons,car,cdr. - Closures with
lambda. - Global variables with
define. - Local variables with
let. - Flow control with
if.
Usage
import glisp
pub fn main() {
glisp.eval("(+ 1 2 3)") //=> "6"
}
Caveats
I wrote this on a transatlantic flight on a day that involved no sleep so expect bugs and other curiosities.