Deutsch   English   Français   Italiano  
<v9m0km$14cad$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna <HenHanna@devnull.tb>
Newsgroups: comp.lang.lisp
Subject: collect-repeats (Tasters Wanted)
Date: Thu, 15 Aug 2024 15:48:53 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <v9m0km$14cad$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 16 Aug 2024 00:48:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e3136333d5489221ac298a31ddaa858b";
	logging-data="1192269"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18jFygs0Wy5lA57YuAHjI08LoBRdHDpwmU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9/5A+GZWYJftUCPPTMcOgXpi21w=
Content-Language: en-US
Bytes: 1378


(use gauche.sequence)


(define (ColRep x)
   (filter (cut > (length <>) 1) (group-sequence x))) ; --- Doesn't work!

                     -----------  possible to write this using CUT ?


(define (ColRep x)
   (filter (lambda (x) (> (length x) 1)) (group-sequence x)))


(define (ColRep x)
   (filter (^x (pair? (cdr x)))   (group-sequence x)))


(print (ColRep  '(1 2 4 4 0 5 5 8 8 8 6)) )
(print (ColRep      '(4 4 0 5 5 8 8 8 6 1 2 3 4 1 2 3 4)))