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

Operator IN doesn't exist ?

 [1/6] from: laplace::worldnet::fr at: 20-May-2002 14:12


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.

 [2/6] 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.

 [3/6] 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 ?
<<quoted lines omitted: 8>>
> 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

 [4/6] from: greggirwin:mindspring at: 20-May-2002 11:57


<< 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 sorry, but I don't understand what your goal is. Could you give a little example maybe? --Gregg

 [5/6] from: gscottjones:mchsi at: 20-May-2002 14:10


From: "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.
Hi, Laplace, Don't blink ... ;)
>> a: "123"
== "123"
>> b: "2"
== "2"
>> c: exclude a b
== "13"
>> probe c
13 == "13" --Scott Jones

 [6/6] from: joel:neely:fedex at: 20-May-2002 12:43


Hi, Laplace, Can you clarify for me? laplace wrote:
> 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 routinely use something like this if none? find ...source... ...target... [ ;; expressions to evaluate if source excludes target ] or do you mean something else that I missed? -jn-

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted