Media Summary: The syntax and semantics of ref cells Textbook: How to use the ideas of `map` and `fold` functionals with binary trees. Textbook: How to implement a Map ADT with association lists as the rep type Textbook:
Overview

Aliasing Ocaml Programming Chapter 7 Video 4 - Detailed Analysis

The syntax and semantics of ref cells Textbook: How to use the ideas of `map` and `fold` functionals with binary trees. Textbook: How to implement a Map ADT with association lists as the rep type Textbook: What looks like mutability in the toplevel is not -- it's really just a consequence of scope. Textbook: ... A deep dive into implementing lists with mutable fields Textbook: References, or ref cells, are pointers to typed locations in memory. They enable imperative

How to infer the type of `if` expressions in HM type inference Textbook: The second part of a deep dive into implementing lists with mutable fields. Textbook: Examples of pattern matching with lists, records, and tuples. Textbook: HM type inference of `let` expressions led to type schemes, which enabled polymorphism. Add mutability, though, could lead to a ... The fields of records can be marked as mutable, providing an alternative to refs. In fact, refs are implemented with mutable fields. The semicolon operator is used to sequence imperative commands Textbook:

The semantics of `let` uses a notion of substitution, but, how should that be defined? These examples lend intuition. Textbook: ... How to implement queues functionally, and how to improve efficiency by using two lists instead of one. Note that the textbook now ...

Gallery

Photo Gallery

Related

Related Patients