~/talk

Functional programming in Kotlin: exploring Arrow

Talkat Heapcon 2022 · 2022-11-03..11-04· [functional-programming]
slides:none on file

Walks through concrete Arrow usage: error handling with Either.left / Either.right where left holds a sealed BadState (NotFound or CatchAll) and right holds values, shows Either.catch for exception wrapping, and replaces nested flatMap with a Either.eager and .bind monad comprehension to keep service code imperative. Demonstrates a pseudo Spring/Micronaut booking example where controller pattern matches to return 404 or 500. Shows optics with @optics-generated lenses to immutably update deep fields. Notes Arrow 1.0 ships last year and is production ready.

AI-written summary · about

  1. 0:00Introduction
  2. 3:20What is functional programming
  3. 10:26Introducing Arrow library
  4. 18:25Error handling with Either
  5. 23:03Monad comprehensions in practice
  6. 25:01Immutability and optics
  7. 29:17Conclusion and Q&A
~/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.