Hacker News new | past | comments | ask | show | jobs | submit login

Thanks for teaching me about the fn trampoline, which I had never seen/used before!

Really cool project!




It's very useful. I once had a codebase where we wrote two (parallel) variants of trampoline called tramampoline and trambopoline, and I'm not even a little bit sorry.


I'm looking at the source, but I'm not sure why "without stack consumption" is true. Is this because trampoline is written such that it takes advantage of tail call optimization even if the inner function doesn't?

https://github.com/clojure/clojure/blob/clojure-1.9.0/src/cl...


Yeah trampoline is kind of rare.

You only see it in cases where some functions are mutually recursive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: