
You might also be intrested in my and oleg's paper "reflection without
remorse" which discusses this construction in a more general setting, the
problems with it and their solution
Paper: http://homepages.cwi.nl/~ploeg/papers/zseq.pdf
Talk: https://www.youtube.com/watch?v=_XoI65Rxmss
On Nov 18, 2014 5:38 PM, "Arie Peterson"
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'.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe