marcpaq / b1fipl

A Bestiary of Single-File Implementations of Programming Languages
995 stars 38 forks source link

Add bare-bones versions of FemtoLisp #16

Closed lassik closed 4 years ago

lassik commented 4 years ago

These are impressively small Scheme interpreters by Jeff Bezanson, now of Julia fame. They are experimental/pedagogical versions of the FemtoLisp evaluator with inessential features removed. FL is also great but requires several thousand lines of C, many files and a boot image.

These interpreters load a system.lsp file containing the standard library, but you can replace it with an empty file and they still work. In that case you have to write your code like this:

> (set 'factorial (lambda (n) (if (< n 1) 1 (* n (factorial (- n 1))))))
(lambda (n) (if (< n 1) 1 (* n (factorial (- n 1)))))

> (factorial 10)
3628800
marcpaq commented 4 years ago

Thanks for the request, but Lisp500 is already in the b1fipl.