## [REBOL] R: Re: Rebol Crash Was Mutability and sameness - a puzzle

### From: rotenca:telvia:it at: 19-Jul-2001 2:52

"Ladislav Mecir" <**[lmecir--mbox--vol--cz]**>

> For the MUT-EQUAL? function to work more satisfactorily we need a better
> LENGTH? function. Here is my trial:
>
> indexz?: function [
> series [series!]
> ] [orig-tail result] [
> orig-tail: tail :series
> while [
> error? try [result: (index? :series) - 1]
> ] [
> if empty? head :series [
> append :series #"1"
> ]
> append :series head :series
> ]
> clear :orig-tail
> result
> ]

Why not:
indexz2?: func [series [series!] /local result][
if error? try [result: -1 + index? :series ] [
result: index? tail head :series
]
result
]
I think that "tail series" should be always the same: a relative position not
an absolute one.
Tail should be always the end. When you remove an item, tail should
dinamically change. So a and b in this case should be(come) the same.
I think that could be util a function to discern if data adressed by series
share the same memory. In this case a and b share memory (you can do "tail
head b" to prove). Same? like mut-equal? makes a difference between series at
different position.
About discernibility i don't understand a thing: if you think of it as "total"
indiscernibility (like Leibniz), so a <> b because "root" are different, or
data indiscernibility, so a word and a path or two different word can be the
same
only because they address the same memory data.
I think that if two item of Rebol were totally indiscernibles, we could not
ask if they are the same, because we could not discern them.
I liked your articles very much.

> Regards
> Ladislav

ciao
romano