Anonymous user
Deepcopy: Difference between revisions
→{{header|Déjà Vu}}: I swear I'm done now
m (→{{header|Déjà Vu}}: Removes extra indentation) |
(→{{header|Déjà Vu}}: I swear I'm done now) |
||
Line 118:
labda obj cache:
set-to cache @obj dup copy @obj
set-default (copy-action)
Line 124:
if has cache obj:
return @cache! @obj
(copy-action)! type @obj @obj cache
deepcopy obj:
Line 152:
!. C
!. D</lang>
{{out}}
<pre>{ :foo [ "bar" ] [ ] [ & 1 2 & 3 4
{ [ ] [ & 1 2 & 3 4 ] :foo [ "bar" ] }▼
{ [ ] [ & 1 2 & 3 4 ] :foo [ "bar" ] }
{ [ ] [ & 1 2 & 3 4 ] :foo [ "bar" "HODOR" ] }
[ [ [ [ [...] ] ] ] ]
|