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 阅读(...) 评论(...) 编辑 收藏

公告

统计

  • 随笔 - 61
  • 文章 - 43
  • 评论 - 1157