Smatchcube's website 🌍

Exercise 3.11

Environments created during the evalutation of ((acc 'deposit) 40):

Here E1 is created during the definition of acc and E2 and E3 are created during the evaluation of the deposit operation.

Environments used during the evaluation of ((acc 'withdraw) 60):

Result environments of evaluating (define acc2 (make-account 100)):

Here each account object has an associated environment so the accounts are kept distinct. The only part of the environment structure shared between acc and acc2 is the global environment.