[REBOL] Re: Change/part
From: ryanc:iesco-dms at: 23-Feb-2001 14:33
When I read "Changes a value in a series and returns the series after the
change," I would expect to get the entire series back as so...
>> change "1234567890" "test"
== "test567890" ;not the real return value!!!
I make this assumption because I take the "after" to mean later in time by
default. If it said it "returns the series before the change," I would expect
it to return the series as it was before the change occured. While not as
inaccurate as I first interpeted this sentence, a slight change in wording could
Unfortuneately my suggested correction was not any better, "changes a value in
a series and returns the part of the series after the change." Since as Andrew
pointed out, it really is not returning the part, but more precicesly the
position. How about this definition: "Changes a value in a series and returns
the series behind the change." I think that says it quite well.
Anyhow, Andrew, I like your real example of using changes return value. I
thought later on that RT may have chosen this return value mainly because the
other positions relating to the change function are much easier to obtain.
Returning the head would be non-standard and is so easily obtained with 'head.
It probably boiled down to returning the before position or the behind the
changed position. Since the before position is readily available, the behind
the changed position seems the obvious choice.
Andrew Martin wrote: