Re: break a variable length list at a specific element
| Newsgroups | gmane.comp.multimedia.puredata.general |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 2024-09-29 at 21:08 +0200, Peter P. wrote: > I am having lists with a variable number of items and I want to break > them > up two lists dependent on the presence of a specific item. Sounds like something from list-abs, though I wasn't able to find an abstraction for that specific task. I had a similar need recently and I made it a bit more generic now. I call it [list-delimit]: https://netpd.org/~roman/tmp/list-delimit.zip It iterates over all elements and switches the route when it hits the 'delimiter' element (e.g. 4 in your example). Roman --- [email protected] - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/[email protected]/message/AZBEWZ2S2L464GNW2FT5PGAUDTL6T5JC/ To unsubscribe send an email to [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/