How do I make multiple calls and collect all the results by output SDL.NoEvent
In the list?
Essential words like this:
events = [] event = SDL.pollEvent while (event! = SDL.NoEvent) {events.add (event) event = SDL. PollEvent} James Cook, with this function:
Pre> unfoldWhileM :: Monad m = & gt; (A -> Child) - & gt; I'm a - & gt; M [A] used with SDL
:
Events & lt; - unfoldWhileM (/ = SDL.NoEvent) SDL.pollEvent
Comments
Post a Comment