[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] back to basics - array trickery
- To: sc-users <sc-users@xxxxxxxxxxxxxxxx>
- Subject: [sc-users] back to basics - array trickery
- From: mark hamlin <hamlinmark1@xxxxxxxxxxxxxx>
- Date: Fri, 17 Sep 2010 12:28:12 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=dS9ZrCcEMkENmskicglLcop5XMM0eyqRk/rgkYI3Toc=; b=FlkYcS7CKNZd5eNEE5WVkXK1R1XmayYDstL2KxCa3WaNY2XiHkiVd5Zv5unNXg3yWZ 8YKtbDWyh3SPWODF1iBVlBgCxnd8A6zmPvL/psKU5wmkKNxEqmgCWm1CXDHYsXbin1kI XJdZrUwJms9O6BeWVPWUfgN7qJ2/z13c+Q4O8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=QKYa+DTV3JHGJpx0oDfpUqdSvFvYAisEs7btRZvZBCH/49br9DDeoEGLsloiG23sHz Bumnk3WVN6mhI3DZlVR6fqqAhd5PlzjoMj1iPZ7Z9pMspoz+/MCQyramQN0LbJ+yGFTH Uul8NY9KO+HM7cA+Urb4k12QamSZczu6wvh2U=
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
What's the smart way to achieve a transformation like this.
source:
[[a,b], [1,2,3]]
output:
[[a,1], [a,2],[a,3], [b,1], [b,2],[b,3]]
Source material for input conforms to the following rules:
1. Only one level on nesting (as in the example above).
2. The nested-lists do not have to be the same length (as in the example above).
3. There can be any number of nested-lists (2 shown in example above).
It looks a little like flop or interlacing. Has this process got a name?
Thanks
Mark
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/