ScalaFP: the Reasons Behind Monads

Why Monad:

1. Functional Programming:

“pure” function = no side effects

2. All applications without side effects are useless!

3. Monad wraps side-effect as if it is “pure” for FP composition.

https://dzone.com/articles/scalafp-lets-find-the-reasons-behind-monads

Advertisements

A Fistful of Monads

Kotlin Monad (and Functor, Applicative)

1. Functor “map” (Kotlin) (fmap or <$> in Haskell)

https://hackernoon.com/kotlin-functors-applicatives-and-monads-in-pictures-part-3-3-832d58d92445

2. Monadsflatmap” (>>= in Haskell)

Haskell Monad:

http://learnyouahaskell.com/a-fistful-of-monads

Do not fear Monoid / Monoidal Category / Monad:

Monad in Haskell

F# Monad:

View story at Medium.com

(分享自知乎网)

https://zhuanlan.zhihu.com/p/29542641