unfoldl

unfoldl :: (b -> Maybe (b, a)) -> b -> Seq a
containers Data.Sequence
unfoldl f x is equivalent to reverse (unfoldr (fmap swap . f) x).