We have already met infinite lists in Chapter 4 and even given an induction principle for reasoning about them in Chapter 6. But we haven’t really appreciated what can be done with them. In this chapter we want to explain in more detail exactly what an infinite list is, and how they can be represented by cyclic structures. We also describe another useful method for reasoning about infinite lists, and discuss a number of intriguing examples in which infinite and cyclic lists can be used to good effect.
Recall that [m..] denotes the infinite list of all integers from m onwards:
ghci> zip [1..] "hallo"
It would take forever to print ...