September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
15
Task/Deepcopy/Phix/deepcopy-2.phix
Normal file
15
Task/Deepcopy/Phix/deepcopy-2.phix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue