Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
25
Task/Deepcopy/PicoLisp/deepcopy-3.l
Normal file
25
Task/Deepcopy/PicoLisp/deepcopy-3.l
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
: (setq A '((a . b) (c d e) f g . e))
|
||||
-> ((a . b) (c d e) f g . e)
|
||||
|
||||
: (setq B (deepCopy A))
|
||||
-> ((a . b) (c d e) f g . e)
|
||||
|
||||
: A
|
||||
-> ((a . b) (c d e) f g . e)
|
||||
|
||||
: B
|
||||
-> ((a . b) (c d e) f g . e)
|
||||
|
||||
: (= A B)
|
||||
-> T # A and its copy B are structure-equal
|
||||
: (== A B)
|
||||
-> NIL # but they are not identical (pointer-equal)
|
||||
|
||||
: (cadr A)
|
||||
-> (c d e)
|
||||
|
||||
: (cadr B)
|
||||
-> (c d e)
|
||||
|
||||
: (== (cadr A) (cadr B))
|
||||
-> NIL # The same holds for sub-structures
|
||||
Loading…
Add table
Add a link
Reference in a new issue