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

[REBOL] Re: head reverse annoys me

From: antonr::lexicon::net at: 20-Dec-2004 13:09

I vote *yes* for the change. As to Romano's question; given: next [1 2 3] ;== [2 3] then it makes sense to get this result: reverse next [1 2 3] ;== [3 2] Often, reverse is used with a variable: blk: [1 2 3] reverse blk ;== [3 2 1] In such a case, the index of the block *is preserved*, instead of "lost" (by going always to the tail). So, also: blk: next [1 2 3] reverse blk ;== [3 2] ; <--- index preserved head blk ;== [1 3 2] Anton.