[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding repetitions of 8-tuples
From: |
Emanuel Berg |
Subject: |
Re: Finding repetitions of 8-tuples |
Date: |
Sun, 08 Jan 2023 05:39:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hans Lonsdale wrote:
> 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.
(require 'cl-lib)
(let ((sl '( (11 12 11 44 11 12 11 23)
(12 21 11 44 11 12 11 23)
(12 21 11 44 11 12 11 23)
;; etc
)))
(cl-delete-duplicates
(mapcar (lambda (s) (sort s #'<)) sl)
:test #'equal) )
--
underground experts united
https://dataswamp.org/~incal