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

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

From: al::bri::xtra::co::nz at: 12-Nov-2002 16:31

Jan wrote:
> > worst of all 'reverse, which returns empty block.
Gabriele wrote:
> I don't know why REVERSE returns the tail of the block. You can use
HEAD REVERSE in expressions,... I suspect that 'reverse returns the 'tail of the block, because to return the 'head of the block could be wrong, if one is 'reverse-ing only part of a block? For example:
>> reverse next x: [1 2 3 4 5]
== []
>> x
== [1 5 4 3 2] Though I'm not sure why one would want to only reverse part of a block (or series)? Andrew Martin ICQ: 26227169