News for hackers. Stuff that matters.
Re:Mental models around Ok-Wrapping by kmill on Friday April 10, 2020 @03:23PM (#22836448)
That's known in Haskell as the List monad. There's a function to transform Maybe (like Rust's Option) to lists. In Haskell, lists can be infinitely long.

Regarding the IO monad, Simon Peyton Jones has an article explaining why they went with that rather than streams. Sadly I don't remember what it was, but it had something to do with proper interleaving of input and output. (Btw, in a way, the IO monad is a stream of commands to the RTS.)

There are no comments on this comment yet.