/my-first-lisp

Everyone has to implement a Lisp at least once, right?

Primary LanguageRust

my-first-lisp

Everyone has to implement a Lisp at least once, right?

This project is based on the excellent pedagogical essays of Stepan Parunashvili and Peter Norvig, in Rust and Python respectively.

In contrast to the above, I'm using the LR(1) parser generator framework, LALRPOP, as I'm too lazy to write a parser myself (despite it being really easy for S-expressions.)

Fibonacci example.

(def fib (fn (n)
  (if (= n 0) 0
      (if (= n 1) 1
          (+ (fib (- n 1))
             (fib (- n 2)))))))