|
|
|
|
|
by corethree
1021 days ago
|
|
>Monads are defined by their operations (flatMap/bind, unit) This is why everyones intuition screws up. It's better to explain monads in terms of the Kliesli operator (>=>). Monads like functions in functional programming are about composition and the explanation should center around that. The right intuition about monads is that they are higher level functions that like regular functions can compose. Bind by itself feels weird and sort of pointless for a newcomer as he usually thinks why does this sort of strangely specific operation need to be abstracted behind a name "monad"? |
|