Hacker News new | ask | show | jobs
by s4vi0r 3198 days ago
Isn't a Monad just the fancy name for a type/structure that implements map and flatMap in a lawful manner?
1 comments

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.