Inside 206-105

Existential Pontification and Generalized Abstract Digressions

Type Kata: Local data type

The imperative. When should you create a custom data type, as opposed to reusing pre-existing data types such as Either, Maybe or tuples? Here are some reasons you should reuse a generic type: It saves typing (both in declaration and in pattern matching), making it good for one-off affairs, It gives you a library of […]

  • April 5, 2011