15 lines
277 B
Text
15 lines
277 B
Text
function deep_copy(object o)
|
|
object res
|
|
if atom(o) then
|
|
res = o
|
|
else
|
|
res = repeat(' ',length(o))
|
|
for i=1 to length(o) do
|
|
res[i] = deep_copy(o[i])
|
|
end for
|
|
end if
|
|
return res
|
|
end function
|
|
|
|
object c = deep_copy(b)
|
|
?c
|