2009-01-16

recur is a trip

This is really just an update to my previous post, but I just added recur to my recursive function.

The Clojure documentation isn't that verbose, in general, and it took my n00b brain some time, and some luck, and some nasty messages from the compiler, to figure out how you actually use recur. Basically, it looks like that, just as you are about to have your function call itself, instead of using the name of your function, you call recur instead. Wow. Why does that seem cool?

No comments: