help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Lists composed of equal number and kind of elements


From: John Mastro
Subject: Re: Lists composed of equal number and kind of elements
Date: Mon, 27 Jul 2015 16:52:34 -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?

-- 
john



reply via email to

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