Media Summary: More about records vs. variants, and how variants can combine "one of" vs "each of" data. Textbook: ... The `option` type, which represents optional data. It's a principled way to avoid the plague of `null`. Textbook: ... Examples of pattern matching with lists, records, and tuples. Textbook:
Exceptions Ocaml Programming Chapter 3 - Detailed Analysis & Overview
More about records vs. variants, and how variants can combine "one of" vs "each of" data. Textbook: ... The `option` type, which represents optional data. It's a principled way to avoid the plague of `null`. Textbook: ... Examples of pattern matching with lists, records, and tuples. Textbook: Using pattern matching to access the pieces of a variant. Textbook: Additional static checks performed by the compiler on pattern matches: exhaustiveness and unused branches. Textbook: ... My web page: www.imperial.ac.uk/people/n.sadawi Useful links: ...
The formal syntax and semantics of pattern matching. Textbook: Examples of variants, which along with records are the primary kind of user-defined data types in How to define a type for binary trees using variants. Textbook: HM type inference of `let` expressions led to type schemes, which enabled polymorphism. Add mutability, though, could lead to a ... The tradeoffs between data structure operations that raise The formal syntax and semantics of variants. Textbook:
More about using pattern matching with variants. Textbook: