Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 808 Bytes

README.md

File metadata and controls

51 lines (38 loc) · 808 Bytes

Trebek

Trebek is a dialect of Lisp, with support for dictionaries, strings and closures. The interpreter is written in Rust.

Features

  • Garbage Collected
  • Lexical Scopes
  • Closures
  • Macros
  • Literals expressions (String, List, Dictionary)

S-expressions

>>> (+ 1 2)
3

Literal expressions

>>> (let (person {:name "john" :age 32})
...   (print (person :age)))
32

Functions

>>> (defn greet (name)
...   (print "Hello " name))

>>> (greet "john!")
"Hello john!"

Iteration

>>> (for name ["john", "doe"]
...   (greet name))

"Hello john!"
"Hello doe!"

License

Copyright © 2021 Shadman Shadab.

All code is licensed under the MIT. See LICENSE file for details.