[plt-scheme] How to perform a union between two lists?
See also soegaard/galore.plt on PLaneT (which gives an efficient
implementation of sets) and the SRFI-1 lset-* operations (which give
implementations of all the standard set operations for sets
represented as lists).
-jacob
On 5/6/07, Robby Findler <robby at cs.uchicago.edu> wrote:
> On 5/6/07, Eli Barzilay <eli at barzilay.org> wrote:
> > On May 6, Grant Rettke wrote:
> > > Hi folks,
> > >
> > > What is the best way to perform a union between two lists?
> >
> > Simple, and not too efficient:
> >
> > (append l1 (remv* l1 l2))
>
> But if you're using lists to represent sets, you presumably aren't too
> too worried about efficiency (and you can't really do a lot better
> than that w/ lists anyway).
>
> Robby
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>