~/talk

Monads Made Semi-Understandable

Talkat Open Source Bridge 2015 · 2015-06-23..06-26· [typescript]
slides:none on file

A concrete claim: monads are the pattern formed by two primitives, flatMap and apply (bind and return), plus the monad laws; Scala code shows how Option short‑circuits nested computations instead of null checks, how for‑comprehension is just sugar, and how map derives from flatMap+apply. Examples include Option, List, Try, IO and State, and the uploader cites using the scalac library to run law tests so an implemented monad can be validated rather than just asserted.

AI-written summary · about

  1. 0:00Start
  2. 2:38The Global View
  3. 3:05Essence of FP
  4. 6:04"Functional Programming in Scala" (on monads)
  5. 6:36Why do we care? Intent of Monads
  6. 8:34Examples of Monads
  7. 9:36Option[A] What is the "Context" of Option?
  8. 10:22Handling potential null values
  9. 11:56Option monad to the rescue!
  10. 13:50flatMap and apply on Option
  11. 15:16Option flatMap and apply
  12. 22:48What happens if we have no Mission? None.
  13. 23:11Implementation of FlatMap again
  14. 23:47For Comprehension Sugar
  15. 25:03Generalizing flatMap
  16. 25:20Follow the Monad Laws
  17. 25:44Equality Laws
  18. 26:25Addition Laws
  19. 26:57Following the Laws
  20. 28:56Primitive Functions
  21. 29:38"map" in terms of monads
  22. 31:04Map can be "derived" from flatMap and apply
  23. 32:49Some Other Monads and Their Contexts
  24. 35:27Take Away
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.