|
|
|
|
|
by yawaramin
3105 days ago
|
|
There are a lot of advanced techniques in these slides, but if you care about program behaviour, in a functional context that mostly reduces to caring about the types of your functions. E.g., in Haskell if you have a function of type `a -> a` you know that it must be the identity function (leaving aside exceptions and undefined). 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.