~/talk

Treasure.map(): Functional Programming in Kotlin

Talkat droidcon Berlin 2022 · 2022-07-06..07-08· [kotlin, functional-programming]
links:none on file
slides:none on file

Explains why common collection functions map/filter/fold/flatMap are the day-to-day functional tools and makes the concrete claim that lists are monads because they provide flatMap; notes Java/Kotlin lack native monad support but libraries Vavr and Arrow add it and shows Arrow's either and bind for monad comprehensions. Describes error-handling tradeoffs (runCatching hides OOM), reports using Arrow in a fraud-detection service with no major performance drawbacks, and recommends adopting either/flatMap where it fits while watching team knowledge and interop with existing libraries.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:56Why functional programming matters
  3. 3:43Elements of functional programming
  4. 8:42Pure functions and side effects
  5. 9:27Immutability in Kotlin and Java
  6. 13:01Map, filter, fold and flatMap explained
  7. 18:49Monads demystified
  8. 21:42Error handling in Java and Kotlin
  9. 27:02Either pattern for error handling
  10. 30:44Monad comprehensions with Arrow
  11. 32:34Conclusion and recommendations
~/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.