University of Virginia, Department of Computer Science
CS200: Computer Science, Spring 2003

Notes: Monday 24 February 2003
Schedule

Notes

Mutation Procedures:

(define (adelphiaize! lst)
   (if (null? lst) 
       (void) ; nothing to return
       (begin
         (if (< (car lst) 0) (set-car! lst 0))
         (adelphiaize! (cdr lst)))))
Why is mutation scary?





Why is mutation useful?



Why do our evaluation rules fail when we allow mutation?





Would it be possible to create a circular list without using set-cdr!?



CS 200


CS 200: Computer Science
Department of Computer Science
University of Virginia

Circle Fractal by Ramsey Arnaoot and Qi Wang

cs200-staff@cs.virginia.edu
Using these Materials