콘텐츠로 이동
Search

Scala:Monad

Monad Laws

Scala 에서의 모나드 법칙.

To qualify as a monad, a type has to satisfy three laws:

  • Associativity - m flatMap f flatMap g == m flatMap (x => f(x) flatMap g)
  • Left unit - unit(x) flatMap f == f(x)
  • Right unit - m flatMap unit == m

See also

lastmod 2024-11-05created 2024-11-05author Zer0 sitemap