list of pairs of numbers

Mar 23, 2011 at 11:32pm

list of pairs of numbers

Hi All,

Im wondering if it is possible to make something like list of pairs of numbers. [1, 2] [2, 3] [x, y] … and store it for example in coll.
So the first element of list would be [1, 2] pair and so on. Thans for your
responses.

#55780
Mar 24, 2011 at 12:19am

If you have one long list of the pairs you want to store you can seperate them with [zl iter 2] and use a [counter] to create the indexes and then [pack] or [prepend] them into 3 item lists (index, x, y) straight into your [coll] object.

– Pasted Max Patch, click to expand. –
#200553
Mar 24, 2011 at 12:47pm

If you want [1 2] [2 3] [3 4], you can use zl stream :

– Pasted Max Patch, click to expand. –
#200554
Mar 24, 2011 at 9:16pm

Thank you for your responses. But Im afraid I ment something different. I wanted to know how to store the pairs in one line of coll. Something like list consisting of pairs of numbers.

#200555
Mar 24, 2011 at 9:28pm

Can’t you just pack them?

Without a patch showing what you’re trying to do, it’s hard to give specific advice.

#200556

You must be logged in to reply to this topic.