SICP Exercise 3.4 call-the-cops
Exercise 3.4. Modify the make-account procedure of exercise 3.3 by adding another local state variable so that, if an account is accessed more than seven consecutive times with an incorrect password, it invokes the procedure call-the-cops.
SOLUTION
I converted the explicit 'dispatch' procedure into a lambda function. This made it more elegant.
The code is here:
SICP Exercise 3.4 call-the-cops
SOLUTION
I converted the explicit 'dispatch' procedure into a lambda function. This made it more elegant.
The code is here:
SICP Exercise 3.4 call-the-cops
Comments
Post a Comment