Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gleam-lang/example-lisp-interpreter
👾 A Lisp interpreter in Gleam!
https://github.com/gleam-lang/example-lisp-interpreter
example gleam lisp
Last synced: 27 days ago
JSON representation
👾 A Lisp interpreter in Gleam!
- Host: GitHub
- URL: https://github.com/gleam-lang/example-lisp-interpreter
- Owner: gleam-lang
- License: apache-2.0
- Created: 2022-10-04T10:02:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-14T19:01:43.000Z (9 months ago)
- Last Synced: 2024-09-03T07:01:59.456Z (3 months ago)
- Topics: example, gleam, lisp
- Language: Gleam
- Homepage: https://gleam.run
- Size: 35.2 KB
- Stars: 32
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gleam - gleam-lang/example-lisp-interpreter - A toy Lisp interpreter in Gleam. (Projects / Compilers)
README
# Glisp
A tree-walking Lisp interpreter written in [Gleam](https://gleam.run)!
It features:
- [x] Ints with `+`, `-`, `*`, and `/`.
- [x] Bools with `not`, `and`, and `or`.
- [x] Comparison with `=`.
- [x] Lists with `empty`, `cons`, `car`, `cdr`.
- [x] Closures with `lambda`.
- [x] Global variables with `define`.
- [x] Local variables with `let`.
- [x] Flow control with `if`.## Usage
```gleam
import glisppub 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.