Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ok, so we can't use the word monad because that's bad apparently. How do we answer "How does Haskell, a FP language where composition is a very important concept, compose IO actions?". Because that's almost always done using monadic actions.

Aside, I agree on the List monad thing. I never ever use the list monad, why would I. But if I'm managing state (i.e. IO, Reader/Writer, Conduit etc), then why wouldn't I use the name of the language construct that Haskell provides to manage state?



> How do we answer "How does Haskell, a FP language where composition is a very important concept, compose IO actions?".

You can answer "By using the combinators provided for composing IO actions".

The fact that the structure encoded (some of) these operations happens to correspond to a monad is something that can be left unmentioned until later.


> Aside, I agree on the List monad thing. I never ever use the list monad, why would I.

I use monad library functions on lists happily, and use the do-notation, particularly when I'm thinking in terms of non-deterministic computation and search.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: