Chapter 12
Lazy evaluation & Lists revisited



How important is lazy evaluation?

Lazy evaluation has been postponed until the final part of the text: the principles in Chapters 1-11 would apply equally well in a strict language such as Standard ML, except that calculation in the form we have given fits lazy evaluation more accurately. It would be possible to bring in lazy evaluation at an earlier stage, but I felt that it was only necessary to talk about it in detail at this stage, where it enables

List comprehensions

We can re-examine earlier examples in the light of the extended list comprehension notation; the delay in introducing the full notation is due to the difficulty I have found in explaining the complete behaviour of list comprehensions with multiple generators and guards.

Next Up

Written 18 May 1995.