Mutable Data Fall Semester 1999 Variable Assignment and Sharing All of the programs that we have written have had the form of a black box with inputs and an output. The value of the output depends only on the current value of the inputs, not on any previous value. In this lecture we learn about mutable data in Scheme.
Most programming languages call mutable data objects variables.
Up until now, we have thought of a name being associated with a value. To think about variables, however, we have to think of names being associated with locations which hold values. We can't change the link from the name to the location, but we can change what is stored there. Suppose that we want to model a bank account. One of the operations on a bank account is withdraw.