A SkillsCast for this session is not available.
This session is based on this talk.
- Product types and sum types
interactive exercise - isFever function that handles degF and degC
interactive exercise - simple DSL for time
type TimeScale = Hour | Hours | Day | Days | Week | Weeks
type TimeDirection = Ago | Hence]
Maybe and Either
Single case DUs
Simple state machines
Designing for correctness. Make illegal states unrepresentable
interactive exercise - simple shopping cart
Handling errors with Either ("railway oriented programming") rather than exceptions interactive exercise - railway-oriented fizzbuzz
Code project: design the types for a blackjack game. Unions, tuples all over the place!
YOU MAY ALSO LIKE:
Algebraic Types
Scott Wlaschin
Scott has over 20 years experience in software development, design and architecture, covering all aspects of business software.