2 ms·
I am assuming "ListT done right" not the deprecated one (which is not even a chain of actions). Here is a definition, to be completely clear: newtype ListT m
by willtim 9y ago
I am assuming "ListT done right" not the deprecated one (which is not even a chain of actions). Here is a definition, to be completely clear:
newtype ListT m a = ListT (m (Maybe (a, ListT m a)))
It is a nice simple example of an effectful streaming type.
> Also, by it's nature ListT can't stream IO
This is only true of the deprecated one, which is also misnamed. The community is rightly re-using the name for the behaviour shown above. See list-t on hackage, or the implementation that comes with Pipes.