[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8012: 23.2; set-difference broken
From: |
Dave Abrahams |
Subject: |
bug#8012: 23.2; set-difference broken |
Date: |
Thu, 10 Feb 2011 06:30:40 -0500 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (x86_64-apple-darwin) MULE/6.0 (HANACHIRUSATO) |
At Wed, 09 Feb 2011 23:58:15 -0500,
Glenn Morris wrote:
>
> Dave Abrahams wrote:
>
> > (set-difference '(a b (c)) '(a b (c)))
> >
> > Result:
> >
> > '((c))
> >
> > Expected result:
> >
> > nil
>
> Maybe you want to use
>
> (set-difference '(a b (c)) '(a b (c)) :test 'equal) ?
>
> since
>
> (eq '(c) '(c)) ; -> nil
> (equal '(c) '(c)) ; -> t
Okay, thanks! But, where is it documented that set-difference is
going to use eq? Oh, I see it in the info.
Rather a shame that the docstrings for the cl set functions don't
mention this; it would have saved me embarrassing myself and both of
us from spending time on this.
Cheers,
--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com