I’d like to thank everyone for their responses. Shortly after posting I realized why it wouldn’t work as I expected (due to the use of the returned, recursive value to build the list).
I started looking into other packages like conduit
, io-streams
, and streamly
(thanks, @reuben) and all seem to be able to do what I want. Although - from first glance and trying things out - I tend to like conduit
more than the others.
@chreekat, thanks for your example!
@danidiaz, I haven’t used ContT
before, so I’ll have to take a look at that one.