def App.turn
import Base3148def App.turn(
3149 -S: Type, shown: Window & Image & List<Event>,
3150 tick: List<Event> -> S -> IO(Maybe<S>), state: S,
3151 rest: Window -> S -> IO(Unit)
3152) -> IO(Unit):
3153 (window, image, events) = shown
3154 do IO<Unit>:
3155 Unit <- IO.pure(Unit, Image.drop!(image))
3156 IO.bind(Maybe<S>, Unit, tick(events, state), App.next(S, window, rest))