Media Summary: What looks like mutability in the toplevel is not -- it's really just a consequence of scope. Textbook: ... More about records vs. variants, and how variants can combine "one of" vs "each of" data. Textbook: ... How `let` expressions create scope and shadowing. Textbook:
Function Types Ocaml Programming Chapter 2 Video 13 - Detailed Analysis & Overview
What looks like mutability in the toplevel is not -- it's really just a consequence of scope. Textbook: ... More about records vs. variants, and how variants can combine "one of" vs "each of" data. Textbook: ... How `let` expressions create scope and shadowing. Textbook: More about using pattern matching with variants. Textbook: Examples of variants, which along with records are the primary kind of user-defined data