emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestions to remove one alist's members from another


From: Davis Herring
Subject: Re: Suggestions to remove one alist's members from another
Date: Fri, 9 Apr 2010 07:11:46 -0700 (PDT)
User-agent: SquirrelMail/1.4.8-5.el5_4.10.lanl1

> If not, my thought is this: when the list was over some size
> I'd determine experimentally, it would instead build a hash
> table from in-list and hit the not-alist against that.  When
> complete it would unfortunately require a second pass
> through the in-alist to return it maintaining the original
> order.

Why not build a hash table (of the cars of the elements) from not-alist
instead?  Then you can just walk in-alist, skipping elements that are in
the hash (that is, whose cars are in it) and adding the rest to out-alist
and (their cars to) the hash.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]