If there is an unfoldM like function then that might do the job, with Maybe or MaybeT m as your choice of monad.

Ollie

On Mon, 2 May 2016, 11:49 p.m. John Ky, <newhoggy@gmail.com> wrote:

Hello,

Does anyone know of anything like Data.ByteString.unfoldr, except that it can fail with a return value?

Cheers,

-John

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners