~/talk

Monads, in my Python?

Talkat PyCon Australia 2015 · 2015-07-31..08-04· [python]
links:none on file
slides:none on file

Shows a concrete maybe monad implemented with decorators where div then sqrt pipelines short circuit on None so failures propagate without try/except boilerplate; demonstrates a list monad that applies and flattens results and points out list comprehensions are a monadic pattern; treats context managers as monads by running __enter__/__exit__ around binds; explains monads as the pair bind and unit and gives working Python code for each example, claims reasonable performance in practice though no heavy optimization is shown.

AI-written summary · about

  1. 0:00Start
  2. 0:52What Are Monads
  3. 1:15Real Life Code
  4. 2:24Composition
  5. 3:25Procedures
  6. 5:47Functions and Pure Functions
  7. 7:52Big Deal...
  8. 8:29Awkward Squad
  9. 9:34Print Fail!
  10. 11:02Domains (input)
  11. 11:30Example in Categories
  12. 12:16Extend the Range
  13. 12:41New Ranges (output)
  14. 13:03Extend the Domain and Ranges
  15. 13:33Extended Domains + Ranges
  16. 13:44Tedious
  17. 14:06Map from This Category
  18. 14:21Functor
  19. 14:58Interfaces Recap
  20. 16:53Monadic Values
  21. 17:20Maybe Monad
  22. 18:55Sanity Check
  23. 19:47List Monad
  24. 20:04Example Time
  25. 21:32Seems Familiar...
  26. 21:57The General Idea
  27. 22:33Opening Files
  28. 23:07Sounds Familiar?
  29. 23:43Other (Possible) Monads
~/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.