[REBOL] Re: recursive?
From: lmecir:mbox:vol:cz at: 24-Jul-2001 19:08
Hi Romano,
----- Original Message -----
From: Romano Paolo Tenca <[rotenca--telvia--it]>
To: <[rebol-list--rebol--com]>
Sent: Tuesday, July 24, 2001 6:08 PM
Subject: [REBOL] Re: recursive?
> You have not changed the behaviour in this case:
>
> x: [1]
> insert/only x next x
> recursive? x;== false
>
> But copy/deep hates this index-hided-recursion also:
>
> copy/deep x; -> crash
>
> this could mean that copy/deep has a different idea of recursion? :-)
>
> ---
> Ciao
> Romano
This really is a special case. If I try:
x: [1]
insert/only x next x
probe x ; == [[...] 1]
Mold is trying to convince me, that the block's textual transformation isn't
finite, which is not the case, because:
length? x ; == 2
first x ; == [1]
second x ; == 1
which means, that the block can be represented by:
[[1] 1]
And it neither contais itself nor any of its subblocks does.
Moreover, a pretty simple copy can be obtained by using:
simple-copy: reduce [copy first x second x] ; == [[1] 1]
without any "infinite cycling". Of course, I don't know, how COPY/DEEP
works. What do others think about that?