[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: Lists composed of equal number and kind of elements
From: |
John Mastro |
Subject: |
Fwd: Lists composed of equal number and kind of elements |
Date: |
Mon, 27 Jul 2015 16:55:56 -0700 |
>> Anyway, to answer your question, try this:
>>
>> (defun set-equal (list-1 list-2)
>> (and (null (cl-set-exclusive-or list-1 list-2))
>> (= (length list-1)
>> (length list-2)) ))
>>
>> Note: Depending what is deemed faster and/or more
>> likely to tell the correct state, the order of the
>> `and' arguments could be reversed...
>
>If `cl-set-exclusive-or' returns nil, aren't the two lists guaranteed to
>have the same length?
Doh! I just realized my error:
(cl-set-exclusive-or '(a a b) '(a b)) ;=> nil
--
john
- Lists composed of equal number and kind of elements, Andreas Röhler, 2015/07/27
- RE: Lists composed of equal number and kind of elements, Drew Adams, 2015/07/27
- Re: Lists composed of equal number and kind of elements, Emanuel Berg, 2015/07/27
- Re: Lists composed of equal number and kind of elements, John Mastro, 2015/07/27
- Fwd: Lists composed of equal number and kind of elements,
John Mastro <=
- Re: Lists composed of equal number and kind of elements, Emanuel Berg, 2015/07/27
- Message not available
- Re: Lists composed of equal number and kind of elements, Barry Margolin, 2015/07/28
- Re: Lists composed of equal number and kind of elements, Emanuel Berg, 2015/07/28
- Message not available
- Re: Lists composed of equal number and kind of elements, Pascal J. Bourguignon, 2015/07/28
- Re: Lists composed of equal number and kind of elements, Emanuel Berg, 2015/07/28
- Re: Lists composed of equal number and kind of elements, Marcin Borkowski, 2015/07/29
- Re: Lists composed of equal number and kind of elements, Emanuel Berg, 2015/07/29
- Re: Lists composed of equal number and kind of elements, Emanuel Berg, 2015/07/29
- Message not available
- Re: Lists composed of equal number and kind of elements, Pascal J. Bourguignon, 2015/07/29
- Re: Lists composed of equal number and kind of elements, Rusi, 2015/07/29