Like bow ties and time travel, algebraic data types are really cool. They help you match the data model to your domain while still providing type safety. With the help of the Doctor and his traveling companions, this session will explore the universe of product types and sum types, helping you shape your app's data in a way that accurately reflects the domain you are working in and that improves the completeness of your code. And don't worry, you don't need to be a Time Lord to get started!
16. let wibblyWobbly episode =
match episode.Identifier with
| Number num -> String.replicate num “timey wimey”
| Name str -> sprintf “%s is my favorite episode” desc
17. let wibblyWobbly episode =
match episode.Identifier with
| Number num -> String.replicate num “timey wimey”
18. let wibblyWobbly episode =
match episode.Identifier with
| Number num -> String.replicate num “timey wimey”
19. So why are Algebraic Data Types so cool?
➢ The flexibility and expressiveness of
dynamic type systems
➢ The security and support of static types
systems
20. “DOMAIN MODELING MADE FUNCTIONAL!!!
AND F# FOR FUN AND PROFIT!!!
BY SCOTT WLASCHIN!!!”