From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.help Subject: Re: Finding repetitions of 8-tuples Date: Sun, 01 Jan 2023 16:13:50 +0100 Message-ID: References: <1399831366.706043.1672506045023@ichabod.co-bxl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14516"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Help Gnu Emacs To: Hans Lonsdale Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 01 16:19:31 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pC07U-0003T5-S1 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Jan 2023 16:19:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pC07F-000796-4t; Sun, 01 Jan 2023 10:19:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pC074-00077e-10 for help-gnu-emacs@gnu.org; Sun, 01 Jan 2023 10:19:02 -0500 Original-Received: from mail-am7eur03olkn20811.outbound.protection.outlook.com ([2a01:111:f400:7eaf::811] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pC070-0006Xl-Ob for help-gnu-emacs@gnu.org; Sun, 01 Jan 2023 10:19:00 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DLP1SOMui5CR8W599iK/3roYEQqZHw/hCE+/lOmKMcCkn24HkzT9/OkgfHmHfqOoG0X1s20R9P1EZ36YhLogm4hlknlL6NBVa3tnh/hNyCknvVYkac8kAxrbcMmLyHWoHi17fFwgzttskCpnF9gOeWyDXQ0Jmm+tlakfUtTf+6oSAOGT0VRdgjby4Bjsw9G6cuMpfGZHt+PQ1NO0p5P77EmoCgXv2gXzI8DQTM3AurXXOPWCA7mcAkKNlRbgIh4XT9VI1b23rGZFqaBY7xUKWZPZz862HlzbF12hPvXj0Ucco9t9nhB4HHeF80DInJK2CGNxsYPCqEZ4JGNzauV5Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E2iS2nRn5sxGfT7iJ1FuNwQPu/mvbl9tt1C9SUiXXug=; b=fDB2or8DnFwKNutl7sEQE11KPyzc+1b08J9P5qwS8z1Iena/KVW6Z+BPvX0jI0XX/3eWeAx5x0mRRrBzGaK58RdV7jof2owGdm8IXeGESoDDoy9qXe8tF8q9i74JZ7e1km0Zo6V6uYyv7zuF7BgbXcNXvnxWWaYC+P8Vtdir4NZP8UKVoWkRUc9mibFSv5KRRlm1LsPWhfFYzb3LNmAH2hTTV3h2kXgWFlaihRJotwR1TlcHLL+Bx+WAwtUeumCE2iZ9tsuZizmp4ax6dgYtb/e5pNZzZ2jj9OZ/Qn72xGPsk5hYR3PlTokL3how8Vqwv6VYXjxHQnZrm69EydcKYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E2iS2nRn5sxGfT7iJ1FuNwQPu/mvbl9tt1C9SUiXXug=; b=Qc6BrooIkrZRZUlxd9FbE4lQa2vjbSTEwDMi7LLvehHNgSi0yOeZ9UxYez0HAUKkMuCMXK6ZOYK59ik0hOe2CvV9qHp5fWGE55y7mchpq07zCnbVwUK5GFOsskt7JTtUizZbuj+cFPU9Ds8XEdiNUTc3RLW3BEjmmRT7n2yy1FHzKb0dGCGG2pzdmD/dFm3bH0L7gY7hm5DsLNASZK4kkZknSBfyzpWgF+qGLpv6PgHfyPMnjrNNV96IdT8tg2eRJqLLZ/K1lv1S2yfmnuYueT3yFPUwRcEkjjdH4qtl+llN/PSnH0ZqoJIBQkJgl/S/1SK3SZX/sOCjvgL1HLYuyQ== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by PR3PR09MB4361.eurprd09.prod.outlook.com (2603:10a6:102:36::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.18; Sun, 1 Jan 2023 15:13:52 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::5a10:d437:ce3d:7297]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::5a10:d437:ce3d:7297%4]) with mapi id 15.20.5944.019; Sun, 1 Jan 2023 15:13:52 +0000 In-Reply-To: <1399831366.706043.1672506045023@ichabod.co-bxl> (Hans Lonsdale's message of "Sat, 31 Dec 2022 18:00:45 +0100 (CET)") X-TMN: [c5mY2hibG+RxuyS/FasuKOf1zM9ejw0K] X-ClientProxiedBy: BE1P281CA0141.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:7c::13) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87bkni70ep.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|PR3PR09MB4361:EE_ X-MS-Office365-Filtering-Correlation-Id: 2149cee9-5d98-41bd-456f-08daec0aca8c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yzeQIWIWsgaBEorxQyXWDp1RMagIOc3oeqwdZBgMUnYS+xuETAjU7OUDJEY11htpT1w1VkvqPMCf7GYFnsQxb91xR+JxWXNIcfp7fFKFZtAQ4Dn2u+PrYpXmBHWlHWFGb2KkZk6YG5OBjeMfFyOAnz5FlVbBLu8TsfNBUdRzIyiWqQzEb7Ny6gKYVF054jjXXfhDvOt8LrGYTXD6+mDpCfOBaQhUo1GU0BCltx3P2d5SPRaW2iOnyHTuE5V4pasXL2U6asEZOOypXUEIO6/UOkoq0W6m4iqDZoGkfDuts348iuRGJZEY0scLhcxf8kDf+f6gJ0ofEypoeGTrOujCF/QHHWlmfUmqkQxwaJ/SZTFgiOA/5nP7DFatlPJBqTtpiZm19BKKV5xZApQhEqIpjenoN1ZFy0yHk2Pf5+YRB5iq7puL0/dgaJlZwPYVh1cb3inPV+L7A8CaifBComY93F7hBbyY+tQTD6BmBYYq/MNt6HPgJrftyQid/mAIXtUVi/GtHUKOJ7f2Pp7FtKhOSqVHQJ3gakV/aS3xVgsXTFftDBQP6TSWvQq3IrsE3v04lzmOq10AVrdghul6OiDlwiThA3i1SUycjJ/qDDaT3Ww4wbwVfVrMCej68BIuwuIVB/Sv8o+WKGWtx/h8ikpuCQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OEkvaE5SbktjbEVKWXFEOUN6Z1RTUEZVU0RxQU9pa3p3a0hNY3ZWZXU0b0dS?= =?utf-8?B?VnVuTVRocjZTTVcwbXExQllTUk0rd3N6blI4OVZ1UEoyVTVZK00wNklaOVgx?= =?utf-8?B?VWZwcnQya3hLR1NNSis3UXVmNXBPN1R2dFZpUjh5dDJLcGRpQ1pJL3VDNlg2?= =?utf-8?B?ZGJmYVhtTCs2S2pFSUdtQ0ZEbjloSjZjdnFiK0c1YW9yaWFJckdsZ09HTUg3?= =?utf-8?B?dVRCNlp4YWdZTXZPNGZLemlPMHJlYm5UdWdLaXFDYklOVytqc0JGQ2VhSG1C?= =?utf-8?B?RXdOMkhQNEN1VWxSMGdYUFNwOTZUQVpkOTdQcjV3Qmx4eWRjRUVMRFAvdHBa?= =?utf-8?B?OXlhNTRMd2hVOTFaVlhvYXFGdlFIU0xNVE9uNnQ3b2w5OEZXcmdvamFzMjNs?= =?utf-8?B?SjhYTkZTckxpYm55b2JVaFpoN3M2dHREdEF2aWE2WnI1OWM3R0NjVkpyeU0z?= =?utf-8?B?UDd1aW4vV3VUSXY4MFp0YURTUk0rTDBqVElkYmdsYmlmTEJIQk43SE84VTBM?= =?utf-8?B?U2RjQTBBT1EzK1dZZHpzalo0cnIyV0tYLy8wa0VBWFZsTzgraXZ0YkxPdFZI?= =?utf-8?B?cnovMW9hTi9DWmpMdk4zWXpqNkJ6MzMxemZWdHgzSnNLRkNHOFlDVStPWGdJ?= =?utf-8?B?enhMNVBJOXMrNElETjdiWk50d0NTMEd3S3BES2 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 2149cee9-5d98-41bd-456f-08daec0aca8c X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jan 2023 15:13:52.1936 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR09MB4361 Received-SPF: pass client-ip=2a01:111:f400:7eaf::811; envelope-from=arthur.miller@live.com; helo=EUR03-AM7-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142082 Archived-At: Hans Lonsdale writes: > I have 16 collections of 8 numbers > > (11 12 11 44 11 12 11 23) > (12 21 11 44 11 12 11 23) > and so on > > I want to find whether there are repetitions of each 8-tuple. > The order in which the numbers occur is not important. Have you looked at "lists as sets" chapter in the manual? There is a 'cl-subsetp' you could start with: cl-subsetp is an autoloaded native-compiled Lisp function in =E2=80=98cl-= seq.el=E2=80=99. (cl-subsetp LIST1 LIST2 [KEYWORD VALUE]...) Return true if LIST1 is a subset of LIST2. I.e., if every element of LIST1 also appears in LIST2. Keywords supported: :test :test-not :key (defvar l1 '(11 12 11 44 11 12 11 23)) (defvar l2 '(12 21 11 44 11 12 11 23)) (cl-subsetp l1 l2) ;; returns t However there is a slight problem since it tests for the subset: (defvar l3 '(12 21 11 44 11 12 11)) (cl-subsetp l3 l2) ;; returns t also (and (cl-subsetp l3 l2) (=3D (length l3) (length l2))) ;; should do Alternatively there functions to test membership, so you could easily roll = your own little defun with 'member' or something else.