[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wanted: Adding list-elements into an existing list
From: |
Allan Gottlieb |
Subject: |
Re: Wanted: Adding list-elements into an existing list |
Date: |
Thu, 16 Oct 2008 12:02:13 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
At Thu, 16 Oct 2008 08:43:48 -0700 Drew Adams <drew.adams@oracle.com> wrote:
>> (append) does not modify its first argument which is what I want.
>> I can solve it through (setq x (append x y))
>
> Depends what you want. You mentioned `add-to-list', which adds an element only
> if it is not already there. Neither `append' nor `nconc' does that for
> combining
> lists.
>
> Sounds more like you want something like set intersection: see functions
> `intersection' or `nintersection' in library `cl-seq.el'.
Sounds more like set union to me.
allan
Re: Wanted: Adding list-elements into an existing list, Pascal J. Bourguignon, 2008/10/16