This is a small interpreter of a subset of Scheme. It implements the same language as <a href="https://github.com/nukata/little-scheme-in-python" rel="nofollow">https://github.com/nukata/little-scheme-in-python</a> (and also its meta-circular interpreter, <a href="https://github.com/nukata/little-scheme" rel="nofollow">https://github.com/nukata/little-scheme</a>). As a Scheme implementation, it also handles first-class continuations and runs the yin-yang puzzle correctly.<p><pre><code> $ cat yin-yang-puzzle.scm
;; The yin-yang puzzle
;; cf. https://en.wikipedia.org/wiki/Call-with-current-continuation
((lambda (yin)
((lambda (yang)
(yin yang))
((lambda (cc)
(display '*)
cc)
(call/cc (lambda (c) c)))))
((lambda (cc)
(newline)
cc)
(call/cc (lambda (c) c))))
;; => \n*\n**\n***\n****\n*****\n******\n...
$ little-scheme-in-go yin-yang-puzzle.scm | head
*
**
***
****
*****
******
*******
********
*********
$</code></pre>