In order to see the difference, you have to change something in the "deep"
data:
>> a: [ 1 2 [ 3 [ 4 5 ] 6 ] 7 8 ]
== [1 2 [3 [4 5] 6] 7 8]
>> b: copy a
== [1 2 [3 [4 5] 6] 7 8]
>> c: copy/deep a
== [1 2 [3 [4 5] 6] 7 8]
>> change a/3 9
== [[4 5] 6]
>> a
== [1 2 [9 [4 5] 6] 7 8]
>> b
== [1 2 [9 [4 5] 6] 7 8]
>> c
== [1 2 [3 [4 5] 6] 7 8]
This shows that 'copy/deep did a true copy of the imbedded blocks, where
'copy did not.
- Michael Jelinek
[EMAIL PROTECTED] on 08/28/2000 09:33:39 AM
From: [EMAIL PROTECTED] on 08/28/2000 09:33 AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: [REBOL] copy versus copy/deep
As my example below shows, there does not appear to a difference in
handling nested blocks between copy and copy/deep
>> a: [ 1 2 [ 3 [ 4 5 ] 6 ] 7 8 ]
== [1 2 [3 [4 5] 6] 7 8]
>> b: copy a
== [1 2 [3 [4 5] 6] 7 8]
>> b
== [1 2 [3 [4 5] 6] 7 8]
>> c: copy/deep a
== [1 2 [3 [4 5] 6] 7 8]
>> c
== [1 2 [3 [4 5] 6] 7 8]
>> b
== [1 2 [3 [4 5] 6] 7 8]
>> a
== [1 2 [3 [4 5] 6] 7 8]
>>
Get your FREE Email and Voicemail at Lycos Communications at
http://comm.lycos.com