A Clojure-like Lisp interpreter written in Python
- Implement Clojure's sequence abstraction
- Implement immutable base datastructures
- Provide Python interop
Clone this repo, and run the REPL script:
python repl.py
Within the REPL functions may be defined as Vars
which are interned into a
namespace:
(def fib (fn [n]
(if (< n 2)
1
(+ (fib (- n 1)) (fib (- n 2))))))
Now with fib
defined:
=> (map fib (range 0 10))
(1 1 2 3 5 8 13 21 34 55)
This is a project that isn't intended to be used for anything serious: it's for fun and edificiation.