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

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

From: nitsch-lists:netcologne at: 21-May-2002 1:43

Hi Sunanda Am Montag, 20. Mai 2002 17:04 schrieb [SunandaDH--aol--com]:
> 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" > ] >
or if empty? exclude seriesB seriesA [ print "b is subset of a" ] ;)
> (You'll need to get the 'unions in to deduplicate if the series can have > repeated values) > > Sunanda.
Volker