Hacker News new | ask | show | jobs
by hota_mazi 3204 days ago
It's not just monad transformers, monads themselves are pretty awkward to use in any language that's not Haskell. And actually, a lot of FP languages simply don't even have monads at all (OCaml, F#).

Monads should never have escaped Haskell.

2 comments

> Monads should never have escaped Haskell.

They should have put them in a monad.

Isn't a Monad just the fancy name for a type/structure that implements map and flatMap in a lawful manner?
Close: the required operations are `flatMap` and bind/pure/point/lift/return/whatever-you-want-to-call-it.

You can derive `map` from these two other functions so it doesn't need to be part of the interface.

Bind is flatMap (>>=)

Confusingly, map in scala is fmap in Haskell

Oops you're right of course. And I can't edit my post.