Laziness is amazing
I'm really just starting to grasp what you can do with laziness (I would say I'm "on my way" but there was a hiccup the other day where I wanted to produce a lazy sequence of files for processing (so that I could map over them, or maybe use 'seque') as the files appeared in the directory; if you know how to do this, please share!). But so far the experience has been really good. I've started to notice situations where it would be genuinely useful, but there's also just the cool factor (and that goes pretty far for me):
(def integers (iterate inc 1)) (take 5 integers); gives: (1 2 3 4 5)
Fun.
*edit: I forgot to mention, this example is from the excellent Programming Clojure
Comments [0]