Master lazy sequences before they master you
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 course 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.
Want this course?
Love it or leave it guarantee
If you don't learn as much from this course as you thought, just ask for a refund within 30 days and I'll give you your money back.
1. What are lazy sequences?
This lesson introduces lazy sequences. This lesson includes a video with visual aids. The video lesson is 6 minutes long.
2. Gotcha: Effects and chunking
This lesson teaches the care needed when mixing effects and laziness, as well as what chunking is. This lesson includes a video screencast with slides and exercises. The video is 5 minutes long, and the exercises might take 10 minutes.
3. Gotcha: *print-length*
How to use print-length to avoid printing very long lists. This lesson includes a video screencast and an exercise. The video is 3 minutes long.
4. Gotcha: holding onto the head
Got an out of memory error? It could be a common gotcha with lazy sequences. A screencast and some code are included. The video is 8 minutes long.
5. Gotcha: length checks
This lesson teaches how to check the length of all sequences, including infinite ones. It includes a screencast and some sample code. The video is four minutes long.