Re:Lisp.py
by capableweb on Wednesday July 20, 2022 @10:54AM
(#32166616)
Here is a lisp implementation (mal) with TCO, written in Python:
- https://github.com/kanaka/mal/blob/master/impls/python/step5...
- Theory: https://github.com/kanaka/mal/blob/master/process/guide.md#s...
Re:Lisp.py
by Xophmeister on Wednesday July 20, 2022 @05:05PM
(#32172318)
You can implement TCO in Python manually with continuation-passing style and trampolines.
1: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimi... 2: http://neopythonic.blogspot.com/2009/04/final-words-on-tail-...