Arc Forumnew | comments | leaders | submitlogin
1 point by gaah 6100 days ago | link | parent

I don't have access to the Arc source for various reasons at the moment (maybe in 30 minutes), but assuming an appropriate definition of deepcopy:

  (mac w/nondestructive (names . body)
    (if (acons names)
        (cons `(fn ,names ,@body)
              (map [list 'deepcopy _] names))
        `(let ,names (deepcopy ,names) ,@body)))
There's probably a better way to write that, but that's what I have now.