chickadee » aima » copy-world

copy-world worldprocedure

Make a deep copy of a graph-world.

world
The world to copy
(define (copy-world world)
  (let ((world (hash-table-copy world)))
    (hash-table-walk
      world
      (lambda (name location) (hash-table-update! world name copy-location)))
    world))