unfoldr but with IO? - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Joel McCracken

I need something like:

unfoldrio :: (b -> IO (Maybe (a, b))) -> b -> IO [a]

anyone have any ideas?

Mats Rauhala

Conduits, pipes, list t and probably machines have a function called unfoldM