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

[REBOL] Re: Cunning use of [], () & {} in R# and in future? Rebol versions?

From: moliad:aei:ca at: 18-Oct-2003 11:22

> That looks like a new "range selection" dialect. > I can imagine a range-pick function perhaps: > > range-pick: func [series dialect][...] > > blk: [a b c d e f g] > range-pick blk [1 (3 5)] > ;== [a c d e]
but now you can't leave the start and end infinite unless we do something like: blk/[ 1 (3 *)] I still prefer this type of syntax: blk/[1 3:5] it is clear, and uses the least typing each space defines a block to extract it also looks most like spreadsheets syntax when specifying ranges . we could even add the ~ or ! (not ) operator blk/[ 5: ~10 ] ; everything starting at 5 but not the tenth element. because the colon is already used, maybe we could simply use another character: -MAx