4 ms·
can it execute the y-combinator?
by coderatlarge 1y ago
can it execute the y-combinator?
- spyrja 1y agoIt doesn't appear to, but you could always add this to the included common.lisp file: (define Y (lambda (f) (lambda args ((f (Y f)) . args))))
- f1shy 1y agoI’m pretty sure does not handle TCO… so probably not, unless with a huge stack.
- gbacon 1y agoSee tinylisp-extras.c for TCO. https://github.com/Robert-van-Engelen/tinylisp/blob/2d0fb35b7bde11027384691aa34c3c2648945153/src/tinylisp-extras.c#L262 https://github.com/Robert-van-Engelen/tinylisp/blob/2d0fb35b...