Monad Explained in One Picture

Monad explained in one picture


The point of Monad is composability. In the green category, T -> Monad<U> and U -> Monad<R> are not composable. flatMap turns a function of type T -> Monad<U> into a function of type Monad<T> -> Monad<U>, so that in the blue category, they become composable.

posted on 2017-05-05 13:00  Todd Wei  阅读(815)  评论(0编辑  收藏  举报