Reasoning About Program Behavior Algebraically [pdf](dev.stephendiehl.com) |
Reasoning About Program Behavior Algebraically [pdf](dev.stephendiehl.com) |
Taking this further, you can define functions of types that specify your desired behaviour exactly, e.g. guess what this does:
foo :: List a -> SortedList a
Or this: bar :: VerificationToken -> Email Unverified -> Email Verified
That's really the main idea. If you specify the types in the right way, you can make them describe the function quite nicely.... and I think this presentation had a lot more to offer than the absolute bog-standard techniques of labeled transition systems, whether you do it in the types or not.
> Why Haskell is Interesting
https://www.reddit.com/r/haskell/comments/7l2z7d/pdf_stephen...