Lazy sequences

Clojure sequences are lazy by default. They're a common source of errors in Clojure software. What's worse, the error messages do not give much clues that the error has to do with laziness. They can be frustrating, but they're worth learning for the power they give you. Here's what you need to learn:

  • What they are and how to think about them
  • How to avoid the most common gotchas
  • The benefits of laziness and how to make them work for you
This section is designed to get you over the major hurdles of lazy sequences so you can start enjoying the separation of concerns that Clojure's lazy sequences grant you.