This is a Lisp interpreter compatible with lisp-in-dart, lisp-in-cs and lisp-in-go.
another one:
Indy9000/lisper: Lisp Parser Interpreter written in TypeScript @GitHub
test('factorial(5)', () => {
const t = ParseList(`
(defn main ()
(defn factorial (n)
(if (== n 0)
1
(* n (factorial (- n 1)))
)
)
(factorial 5)
)
`)
const actual = Run(t)
expect(actual.value).toBe(120)
})
TypeScript: Live Coding a Lisp Interpreter from scratch (Part 1) - YouTube
No comments:
Post a Comment