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