6 Nov
2001
6 Nov
'01
1:34 p.m.
| I seem to be able to give it an | infinite list of computations and yet start receiving | results immediately....
This is not true, as the following example demonstrates:
main :: IO () main = sequence [ return i | i <- [1..] ] >>= print
You are right. I was confused between the visible results of the action and the functional result. For example, sequence [ print i | i <- [1..] ] outputs the numbers to screen immediately, but never produces a value. Regards, Malcolm