5 ms·
I was confronted with recursion early on, but didn't really see the point outside of tree/graph traversals. It just didn't seem worth the effort given lousy per
by codr7 8y ago
I was confronted with recursion early on, but didn't really see the point outside of tree/graph traversals. It just didn't seem worth the effort given lousy performance and constant risk of stack overflow.
Then I started writing Lisp, and the &rest is history.
The cool thing about optimized tail recursion is that any loop you can dream of [0] is just a macro away. It also helps with keeping the core of the language clean, as fewer primitives are needed.
https://github.com/codr7/g-fu#macros https://github.com/codr7/g-fu#macros