Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #257: That would be because the software doesn't work.


comp / comp.lang.misc / in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))

SubjectAuthor
o in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))HenHanna

1
Subject: in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))
From: HenHanna
Newsgroups: comp.lang.python, comp.lang.misc
Organization: A noiseless patient Spider
Date: Sun, 9 Jun 2024 21:20 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.python,comp.lang.misc
Subject: in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))
Date: Sun, 9 Jun 2024 14:20:20 -0700
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <v456ak$3pmpo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 09 Jun 2024 23:20:20 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ed01cd9e6d841d23fe19143a8bec1fed";
logging-data="3988280"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+031JokDcfFo3e+03SY6D5anWe9o6AndI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:OIh6iIs8scLZDA5oVR17jGMnAtI=
Content-Language: en-US
View all headers

Chunk, ChunkC -- nice simple way(s) to write these in Python?

(Chunk '(a a b a a a b b))
==> ((a a) (b) (a a a) (b b))

(Chunk '(a a a a b c c a a d e e e e))
==> ((a a a a) (b) (c c) (a a) (d) (e e e e))

(Chunk '(2 2 foo bar bar j j j k baz baz))
==> ((2 2) (foo) (bar bar) (j j j) (k) (baz baz))

_________________

(ChunkC '(a a b b b))
==> ((a 2) (b 3))

(ChunkC '(a a b a a a b b))
==> ((a 2) (b 1) (a 3) (b 2))

1

rocksolid light 0.9.8
clearnet tor