Small Scheme interpreter and REPL

cffbc42 env: implement string-len

7 days ago
17 days ago


Small Scheme interpreter/REPL.


Sushi requires a C11 compiler to build on any system.

$ make
# make install


;; Returns a factorial of a given number (n!)
(define factorial
    (lambda (n)
        (if (= n 1)
            (* (factorial (- n 1)) n))))

(display (factorial 4))

Place the source in a file like factorial.scm and run it with:

$ ./sushi factorial.scm

You can also open a REPL by passing no arguments to sushi:

$ ./sushi
> (+ 2 2)
= 4