~/talk

Discussion: Are Free Monads Really Free?

Talkat fsharpConf 2023 · on Monday, 2023-06-26· [functional-programming]
slides:none on file

Claim: free monads solve interleaving pure and impure code, but in F# practical tools like interfaces, dependency injection, async result and computation expressions usually suffice. Demonstrations include an HTML-title downloader refactored to return Result/Async, a Traverse function that swaps Option<Async> to Async<Option> to avoid nested tasks, and a tiny BASIC emulator implemented directly (not using free monads). Conclusion: know traversable functors and traversal utilities; free monads are possible but rarely necessary in real F# projects.

AI-written summary · about

  1. 0:00Introduction
  2. 1:46Free Monads matter
  3. 3:11Action interleaving with Free Monads
  4. 5:18Free Monads use cases
  5. 7:23Exceptions vs recoverable errors
  6. 9:06Missing resources with Result types
  7. 11:13Monads for domain logic
  8. 13:21Need to understand monads?
  9. 15:28Tasks, options, results in F#
  10. 17:15Traversable functors intro
  11. 20:22Traverse functions failures
  12. 22:28Learning by solving problems
  13. 23:11F# projects with Free Monads
  14. 24:14Functional shell pattern
  15. 27:01Prefetching data simplification
  16. 27:44BASIC emulator case study
  17. 29:50Refactoring state machines
  18. 30:33Conclusion and key takeaways
~/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.