
26 Sep
2012
26 Sep
'12
3:41 p.m.
Hey, In my (SDL based) haskell program, I do: events <- liftM ( takeWhile (/= NoEvent)) $ sequence $ repeat pollEvent The execution of this never returns, I am guessing that is because sequence evaluation never stops. But if sequence would be lazy (and assuming pollEvent returns NoEvent at some point) this should stop, should it not? Is there a lazy variant of sequence? Or am I missing something here completely? Thanks! Nathan