Inspired by Peter Norvig's Lisp.py, I take two days and wrote a tiny but powerful lisp interpreter in JavaScript.
I improved arithmetic operator to support multiple parameter calculations, such as (add 1 2 3 4)
, and added some syntax sugars like let
, let*
, cond
, else
, and
and or
.
Now it could interpret a Y combinator!
install:
# npm install lisp.js
start:
$ lispjs
read code from files:
$ lispjs file1 file2 ...
Have fun!
MIT
Github: Lisp.js