<quote who="Adam T. Lindsay"> > I was wondering if there's a regular way of extracting the head and the tail > (meaning everything but the first element... think car/cdr) of an arbitrary > list message. I'm rooting through the docs, and am not able to come up with > an elegant way of doing this. (looked through the past two months of > archives, and didn't find much)
Use [niagara 1] of zexy. Send the list into the first inlet. The first element will come out of the first outlet and the rest of the list out the second. [niagara 2] would break the list in half at the second element. If you route the second outlet of [niagara n] into its own first inlet it will break a long list into many lists of length n. Very useful!
--andy
Andrew W. Schmeder andy@e-molecule.com