Media Summary: 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: Additional static checks performed by the compiler on pattern matches: exhaustiveness and unused branches. Textbook: ...
Exceptions Ocaml Programming Chapter 3 - Detailed Analysis & Overview
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: Additional static checks performed by the compiler on pattern matches: exhaustiveness and unused branches. Textbook: ... More about records vs. variants, and how variants can combine "one of" vs "each of" data. Textbook: ... Using pattern matching to access the pieces of a variant. Textbook: Examples of variants, which along with records are the primary kind of user-defined data types in
In this tutorial, I will show the basic ideas of immutable lists (cons lists), as well as polymorphic functions that operate over lists. The tradeoffs between data structure operations that raise My web page: www.imperial.ac.uk/people/n.sadawi Useful links: ...