From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Lists composed of equal number and kind of elements Date: Mon, 27 Jul 2015 18:07:43 -0700 (PDT) Message-ID: <3b829dc7-8903-4db3-aeef-98e1b1949e45@default> References: <55B5D99B.9080100@easy-emacs.de> <87egjt41q9.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1438045706 4893 80.91.229.3 (28 Jul 2015 01:08:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2015 01:08:26 +0000 (UTC) To: Emanuel Berg , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 28 03:08:06 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZJtNE-00028G-VT for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2015 03:08:05 +0200 Original-Received: from localhost ([::1]:56591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJtNE-00029W-16 for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jul 2015 21:08:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJtN3-000294-28 for help-gnu-emacs@gnu.org; Mon, 27 Jul 2015 21:07:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJtMz-00063C-Ru for help-gnu-emacs@gnu.org; Mon, 27 Jul 2015 21:07:52 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:40031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJtMz-000631-JB for help-gnu-emacs@gnu.org; Mon, 27 Jul 2015 21:07:49 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t6S17kmu014328 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Jul 2015 01:07:48 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t6S17itJ025775 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 28 Jul 2015 01:07:44 GMT Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t6S17iTR020242; Tue, 28 Jul 2015 01:07:44 GMT In-Reply-To: <87egjt41q9.fsf@nl106-137-147.student.uu.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106049 Archived-At: > (defun set-equal (list-1 list-2) > (and (null (cl-set-exclusive-or list-1 list-2)) > (=3D (length list-1) > (length list-2)) )) All you need to test is (cl-set-exclusive-or list-1 list-2). (a a a b b), (b b a), and (b a) all represent the same set. IOW, neither order nor duplication matters.