withPrevious :: a -> Coroutine a (a,a)
withPrevious first = Coroutine $ \i -> ((i, first), Just $ step i) where
    step old = Coroutine $ \i -> ((i, old), Just $ step i)
withPrevious :: a -> Coroutine a (a,a)
withPrevious first = Coroutine $ \i -> ((i, first), Just $ step i) where
    step old = Coroutine $ \i -> ((i, old), Just $ step i)
withPrevious first = Coroutine $ \i -> ((i, first), Just $ step i) where
    step old = Coroutine $ \i -> ((i, old), Just $ step i)