Collecting IO outputs into list
Posted
by sisif
on Stack Overflow
See other posts from Stack Overflow
or by sisif
Published on 2010-05-16T14:43:11Z
Indexed on
2010/05/16
14:50 UTC
Read the original article
Hit count: 177
haskell
how can i do multiple calls to SDL.pollEvent :: IO Event until the output is SDL.NoEvent and collect all the results into a list?
in imperative terms something like this:
events = []
event = SDL.pollEvent;
while( event != SDL.NoEvent )
events.add( event )
event = SDL.pollEvent
© Stack Overflow or respective owner