3 ms·
https://github.com/hylang/hy/blob/master/docs/contrib/loop.rst https://github.com/hylang/hy/blob/master/docs/contrib/loop.r... I thought this is not possible i
by diadara 12y ago
https://github.com/hylang/hy/blob/master/docs/contrib/loop.rst https://github.com/hylang/hy/blob/master/docs/contrib/loop.r...
I thought this is not possible in python. Can someone explain ? Python doesn't have tail call optimization and hy produces python AST. Am I missing something ?
I tried reading through the source, but I am still a lisp noob.
https://github.com/hylang/hy/blob/master/hy/contrib/loop.hy https://github.com/hylang/hy/blob/master/hy/contrib/loop.hy
- Foxboron 12y agoThe entry is misleading. We don't really do TCO. It's just a trampoline calling the loop/recur form until there is nothing left to produce. Same solution clojure has, as the JVM dosn't allow for TCO.