scanE :: (a -> e -> a) -> a -> Coroutine (Event e) a
scanE f i = Coroutine $ step i where
    step a e = let a' = foldl' f a e in (a', Just $ scanE f a')
scanE :: (a -> e -> a) -> a -> Coroutine (Event e) a
scanE f i = Coroutine $ step i where
    step a e = let a' = foldl' f a e in (a', Just $ scanE f a')
scanE f i = Coroutine $ step i where
    step a e = let a' = foldl' f a e in (a', Just $ scanE f a')