Media Summary: My web page: www.imperial.ac.uk/people/n.sadawi. Examples of variants, which along with records are the primary kind of user-defined More about records vs. variants, and how variants can combine "one of" vs "each of"
Ocaml Data Structures 3 13 - Detailed Analysis & Overview
My web page: www.imperial.ac.uk/people/n.sadawi. Examples of variants, which along with records are the primary kind of user-defined More about records vs. variants, and how variants can combine "one of" vs "each of" Using pattern matching to access the pieces of a variant. Textbook: In this tutorial, I will show the basic ideas of immutable lists (cons lists), as well as polymorphic functions that operate over lists. Examples of pattern matching with lists, records, and tuples. Textbook:
How to define some common operators for function application, including the pipeline operator Textbook: ... Additional static checks performed by the compiler on pattern matches: exhaustiveness and unused branches. Textbook: ... More about using pattern matching with variants. Textbook: How to define a type for binary trees using variants. Textbook: