8.18

IV Programming With State🔗

    12 Programming with State (in Both Pyret and Python)

      12.1 Mutating Structures

        12.1.1 Example: Bank Accounts

        12.1.2 Testing Functions that Mutate Structures

        12.1.3 Aliasing

        12.1.4 Structure Mutation and the Directory

          12.1.4.1 Introducing the Heap

          12.1.4.2 Basic Data and the Heap

      12.2 Understanding Equality

        12.2.1 Equality of Data

        12.2.2 Different Equality Operations

          12.2.2.1 Equality in Python

          12.2.2.2 Equality in Pyret

      12.3 Arrays and Lists in Memory

      12.4 Cyclic Data

        12.4.1 Creating Cyclic Data

        12.4.2 Testing Cyclic Data

        12.4.3 Cycles in Practice

    13 More Programming with State: Python

      13.1 Mutating Variables

        13.1.1 Mutating Variables in Memory

        13.1.2 Variable Mutation and Aliasing

        13.1.3 Mutating Variables versus Mutating Data Fields

        13.1.4 Mutating Parameters in Function Calls

        13.1.5 Mutating Top-Level Variables within Functions

        13.1.6 The Many Roles of Variables

      13.2 Mutable Lists