Arc Cross Reference

copy

[procedure] copy x

(def copy (x)
  (case (type x)
    sym    x
    cons   (apply (fn args args) x)
    string (let new (newstring (len x))
             (forlen i x
               (= (new i) (x i)))
             new)
    table  (let new (table)
             (ontable k v x 
               (= (new k) v))
             new)
           (err "Can't copy " x)))