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

[REBOL] Re: Operator IN doesn't exist ?

From: sunandadh:aol at: 20-May-2002 11:04

Laplace:
> How do you include or exclude a list in rebol ? > find/match/any is ok for inclusion but for excluding it isn't practical at > all
I'm not sure I understand the question, but using 'difference, 'intersect, and 'union to sift and slice series might do the trick. Something like this? seriesA: [1 3 5 7 9] seriesB: [3 5] if (sort intersect seriesA seriesB) = sort seriesB [ print "b is subset of a" ] (You'll need to get the 'unions in to deduplicate if the series can have repeated values) Sunanda.