need to output first element of a list, then rest

gpvillamil's icon

I need to take the first element of a list, use it to set a prefix, then output the rest of the list.

I am using two zl slice objects one after the other. Is this the best way? Just zl slice doesn't work, since it outputs the right side (rest of list) first, and I need the execution order to start with the value from the left outlet.

Max Patch
Copy patch and select New From Clipboard in Max.

ch's icon

Hi,

Max Patch
Copy patch and select New From Clipboard in Max.

I would probably use that :

Bas van der Graaff's icon

Yup, those are both fine. Be care when using right-to-left outputting, I find it good practice to put a trigger in all the time. I don't think speed is an issue in any of these. When you know the first item is going to be an int:

Max Patch
Copy patch and select New From Clipboard in Max.

ch's icon

Or that :

Max Patch
Copy patch and select New From Clipboard in Max.