On 10-Aug-02, Andrew Martin wrote:

> Why do 'append and 'repend return the head of the series? (I'm using
> latest Rebol/Core)

[snip]

It's the same with current non-beta versions (to save others
checking:)

> After all, if one has set the position in a series explicitly, why
> should a function return the series at a different position?

It does seem slightly odd, though I guess it does have its uses.  For
instance, if you want a series to keep its current index, then
just...

    append series something

but if you'd like it to reset its index, then...

    series: append series something

However, I'd think you'd more likely want to compare the results of an
append with something else than do that, in which case returning at
the index might be the more useful.

Maybe it's just faster to return at the head, and given that with most
uses of append you'd ignore what's returned, (he guessed), going for
speed here might've been the deciding factor.

-- 
Carl Read

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to