
18 Nov
2014
18 Nov
'14
11:37 a.m.
What about my doubts on why it works so lazily?
Suppose 'f' is the function '(1 :)', and 'g' is some other unspecified other function of type '[Integer] -> [Integer]' ("difference list"). You may evaluate the concatenation '(f . g) []' like this: (f . g) [] = f (g []) = 1 : g [] and at this point, you already have partial knowledge of the resulting list. Note that we use "lazy evaluation", in the sense that we do not evaluate the argument 'g []' to the function 'f' right away, but proceed by first substituting the definition of 'f'.