8.15

11   Programming with State (in Both Pyret and Python)🔗

    11.1 State, Change, and Testing

      11.1.1 Example: Bank Accounts

      11.1.2 Testing Functions that Mutate Data

      11.1.3 Aliasing

      11.1.4 Data Mutation and the Directory

        11.1.4.1 Introducing the Heap

        11.1.4.2 Basic Data and the Heap

    11.2 Understanding Equality

      11.2.1 Equality of Data

      11.2.2 Different Equality Operations

        11.2.2.1 Equality in Python

        11.2.2.2 Equality in Pyret

    11.3 Arrays and Lists in Memory

    11.4 Cyclic Data

      11.4.1 Creating Cyclic Data

      11.4.2 Testing Cyclic Data

      11.4.3 Cycles in Practice

    11.5 Modifying Variables

      11.5.1 Modifying Variables in Memory

      11.5.2 Variable Updates and Aliasing

      11.5.3 Updating Variables versus Updating Data Fields

      11.5.4 Updating Parameters in Function Calls

      11.5.5 Updating Top-Level Variables within Function Calls

      11.5.6 The Many Roles of Variables