Skip to content

Comment on Translation from Haskell to JavaScript (Introduction to monads) parent

Comments

posting from phone

monads are not for simulating side effects. they can model many things.

functions are already composable with the dot (.). if you want to compose arbitrary structures, use Control.Category.

unit does not have anything in particular to do with monads.

'bind' is specific to each monad and defines its behavior. there is no abstract or generic bind.

the article didn't teach you anything.

ask #Haskell on freenode if you have questions.

Actually, bind and unit seem to fit very well with this interesting article, which explains the mathematics behind monads (in fact it uses unit, which you say has nothing to do with monads): http://bartoszmilewski.wordpress.com/2011/01/09/monads-for-t...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.