unfoldl package:rio

unfoldl f x is equivalent to reverse (unfoldr (fmap swap . f) x).