[REBOL] Re: Exclude Problems
From: ammoncooke::yahoo at: 27-Sep-2001 13:25
Here:
excl-only: func [
"This is the Exclude function that doesn't exclude duplicates"
block1 "The original block"
block2 "The block to be 'excluded'"
][
tmp-block: [none]
tmp-block: remove find copy block1 copy block2
either not none? tmp-block[
return head tmp-block
][
return tmp-block
]
]
HTH!
Ammon
----- Original Message -----
From: "G. Edw. Learned" <[learned--talentsinc--net]>
To: <[rebol-list--rebol--com]>
Sent: Thursday, September 27, 2001 7:12 AM
Subject: [REBOL] Re: Exclude Problems
> Argh, I just tested and yes, that's it exactly. I didn't see that little
> "feature" documented in the dictionary at the REBOL site. Thanks. Is there
> a better source of documentation that I should get other than the online
> word dictionary?
>
> On the bad side, it just made exclude totally useless for my project. I
> don't suppose that remove duplicate is an optional feature? Guess I'm back
> to remove.
>
> --On Thursday, September 27, 2001 5:23 PM +1000 Allen Kamp
> <[allenk--powerup--com--au]> wrote:
>
> >
> > ----- Original Message -----
> > From: "G. Edw. Learned" <[learned--talentsinc--net]>
> > To: <[rebol-list--rebol--com]>
> > Sent: Thursday, September 27, 2001 8:08 AM
> > Subject: [REBOL] Re: Exclude Problems
> >
> >
> >> I thought that too, which is why I reduced it down to excluding just
one
> >> item, SYSTEM, and it still took out words like SEAGATE and strings like
> >> "----". Is a puzzlement.
> >
> > Exclude also cleans up duplicate entries, such as.
> >>> exclude ["AA" "B" "C" "D" "E" "AA" "F" "G" "AA" "B" "AA" "B"] ["C"
F
]