News for hackers. Stuff that matters.
Re:Clojure 2011 Year in Review by jcromartie on Tuesday January 03, 2012 @02:45PM (#3421008)
> if/else, for/do/while

The thing is, these are different in Clojure than in various other languages (although more in common with other Lisps). Constructs like "if" are expressions which return values, which will confuse you the first time it comes up if you don't realize that everything is an expression.

Then there's "for/do/while", where "for" in Clojure is not a loop at all because it produces a lazy sequence. And the equivalent to "do/while" (loop/recur, which enforces tail recursion) is something of a last resort where other sequence functions have failed.

I agree with you 100% that the learning material is a little dry. I don't know what kind of material would work best...

There are no comments on this comment yet.