7. Recursion II: Lazy Sequences
Overview
In this chapter, as we continue our exploration of recursive techniques, we will focus on lazy evaluation. We will write functions that safely produce potentially infinite lazy sequences, use lazy evaluation to consume linear data, produce lazily evaluated tree structures from linear data, and write functions that consume tree structures.
By the end of this chapter, you will be able to think about new ways of understanding and solving problems.