News for hackers. Stuff that matters.
Re:Clojure Don’ts: Lazy Effects (2015) by Tarean on Saturday March 03, 2018 @08:10PM (#16512723)
Worth noting that ListTs bind isn't associative for most base monads including IO and it is deprecated for a reason.

Also, by it's nature ListT can't stream IO unless you use lazy IO aka lazyRead aka unsafeInterleaveIO which deserves its name.

Re:Clojure Don’ts: Lazy Effects (2015) by willtim on Sunday March 04, 2018 @02:22AM (#16513651)
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.