Month: April 2014

Learning Clojure: tutorial, books, and resources for beginners

New to Clojure and don’t know where to start? Here are some books, tutorials, blog posts, and other resources for beginners that I found useful while getting used to the language. I’ll also highlight some resources I’d recommend staying away from due to better alternatives. Brief disclaimer: I have either read at least ~75% of each of these resources – some just weren’t worth reading through to the end.

Let’s start with some books after the break!



Laziness with Clojure

It took me a long time to fully grasp the concept of laziness and eagerness despite working with Clojure for the past few months. As a result, I decided to try and concisely explain the concepts here for any other beginners and also in an attempt to consolidate my understanding. A huge thanks to the book The Joy of Clojure* by Michael Fogus and Chris House. It provided the clearest explanation thus far (for me) on the topic and will be the basis for this post along with a few other sources.

First, what is laziness? Briefly put, it is an evaluation strategy where expressions are evaluated only when their values are needed. I know, that makes little sense at the moment, but bear with me. Second, why should we care? To quote Fogus and House, “the fundamental reason for laziness in Clojure [is] the avoidance of full realization of interim results.” Take that line in, recognize the powerful implications it has. We’ll discuss more after the break.