Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Why does 'reverse returns the tail of the block?

From: jeff:rebol at: 12-Nov-2002 16:15

<[3DCEBE3E--2DDAC72--sympatico--ca]> <[1822275075--20021111113147--tiscalinet--it]> <006f01c289fb$ec2109e0$[4a6036d2--Garfield]> <[892917909--20021112123948--tiscalinet--it]> Howdy, Gabriele:
> Indeed, it could be useful to chain two or more > REVERSE/PART: > > >> x: [1 2 3 4 5 6] > == [1 2 3 4 5 6] > >> reverse/part reverse/part reverse/part x 2 2 2 > == [] > >> x > == [2 1 4 3 6 5]
As your example suggests, REBOL series functions always return the end of the "affected area" because this might be the result of some computed operation. Always returning the head (or the current series index) would throw away the important information of the affected index. Salutations! -jeff