Q:

Is the "where" keyword lazy?

Assuming I have a function like
foo = 8 + f1
  where f1 = 8 + 9
        f2 = 8 + 10

f1 clearly has to be evaluated, but f2 doesn't have to be. Will it be though? I can see how evaluating every where expression would be a performance issue.

A:

Yes, it's lazy, so that f2 will not be evaluated, for example:
foo = 8 + f1
    where f1 = 8 + 9
          f2 = last [1..]

will be calculated instantly, and would take forever if it was strict.

