Finite State Machines for Functional Software Machinery
summary
Defines finite state machines as a type-level function S × I → S and extends to outputs as a transducer with IO returning (S, O). Shows concrete Scala examples: a small Scala.js to‑do UI (drop‑downs, tags, editing), an animation cycling shapes on a 200ms tick, and an account login service with verify/lock/close events. Contrasts two implementations: ADT actions (serializable) vs church‑encoded service methods, notes folds are FSMs, and highlights composition (sequential/parallel), map/flatMap, and improved reasoning and testability.
AI-written summary · about
chapters (9)
- 0:00Introduction to talk
- 2:34What is a finite state machine
- 5:42Simplified FSM in code
- 8:35Core concept of FSMs
- 14:35Adding output to FSMs
- 19:54FSMs in web services
- 22:00Implementation techniques
- 26:59Composing finite state machines
- 30:13Key takeaways and summary
related talks
49mMining Functional Patterns
38mIntro to FP in Scala: Exploring a Toolbox for Solving Problems - Part 5 of 6
35mThe Functor, Applicative, Monad talk
39mShared State In Pure Fp When A State Monad Won't Do
34mHow I learned to stop worrying and love Functional Design
50mFunctional Programming with Effects
37mIntro to FP in Scala: Exploring a Toolbox for Solving Problems - Part 6 of 6
48mDiagrammatic Execution Models for Functional Languages
