News for hackers. Stuff that matters.
Re:Ask HN: Thinking in Functional programming by sctb on Monday July 20, 2009 @12:35PM (#714645)
I believe that you can replace directly recursive tail-calls with the `recur' special form to achieve an iterative function manually. If the function is truly recursive, then Clojure will likely behave much as any Scheme would.
Re:Ask HN: Thinking in Functional programming by apgwoz on Tuesday July 21, 2009 @09:25AM (#716167)
I haven't looked at the code that gets generated by `recur`, but I'm guessing it creates a trampoline, and it looks a bit limiting. (e.g. you can't recur with variadic functions) That said, probably all of the excercises in SICP could be done with `recur` and `loop,` with a few minor changes. Thanks for the tip.