sort and rebuilt list of numbers and symbols

FP's icon

Hello, here's a new game with lists.
How to separate symbols and numbers from a list and rebuilt this list in the right order after some process ?

Input:
[A 1 3 Symbol 12]

Becomes:
[A Symbol] & [1 2 12] for processing

Output:
[A 1 3 Symbol 12]

Thx.

FP's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I got theway to separate symbols & numbers but I can't figure out how to rebuilt the lists...

Rick's icon

Is the input always in the same format? Does it change after processing? If it doesn't change you could use [unpack A Symbol] and [unpack 1 2 12] into a [pack A 1 2 Symbol 12]

FP's icon

@Rick : no it will be to easy. You never know how will be the lists (format and contents/values) and how long it will be. It can change for each.