~/talk

A Real World Example of Functional Programming with fp-ts

links:none on file
slides:none on file

Refactors a real TypeScript airline reservation API into fp-ts types, replacing Promise with TaskEither to express failures explicitly and mapping validation failures to 422 and capacity rejections to 403. Uses fp-ts helpers like te.fromTask and change-error-type, converts promise-based getReservedSeats into a TaskEither, and promisifies results back for the existing handler. The migration uncovers mismatched behavior contracts, lets the type system catch incompatibilities during a refactor (capacity changed from number to a Task-returning function), and reduces runtime error handling.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 2:22What is functional programming
  3. 5:58Introduction to fp-ts library
  4. 8:44Real-world example overview
  5. 10:13Promise-based code limitations
  6. 13:45Promises vs functional programming
  7. 18:25Task Either in fp-ts
  8. 21:18Consuming functional code in API
  9. 25:09Refactoring with type safety
  10. 29:45Other fp types and benefits
  11. 30:29How to start using fp-ts today
  12. 32:17Why functional programming matters
  13. 33:23About the speaker's company
  14. 34:28Q&A session begins
~/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.