A lisp Tree-Walk interpreter written in Rust
Wrote this interpreter mainly for learning rust, the language is inspired by Fennel.
To run the interpreter, simply clone the repository and run with cargo.
git clone [email protected]:lrangell/OxyLisp.git
cd OxyLisp
cargo run
Lists can be defined by []
and elements are separated by white space
[1 2 3]
(def foo ["bar" "fux"])
Records are defined by key and value pairs.
{:a [3 5 7] :b "foo"}
Variables are defined by def
and functions by defn
. Additionally, you can write anonymous functions using fn
.
(def x 42)
(defn double [n] (* 2 n))
(def plus-five (map (fn [n] (+ n 5)) (range 0 10)))
fold, map, concat and range are some of the built-in functions