If I want to traverse, lets's say for example, 3 lists at one time, I would use:
list1 = '(1 2 3)
list2 = '(4 5 6)
list3 = '(7 8 9)
foreach((x y z) list1 list2 list3
printf("%L %L %L\n" x y z)
But, how do you do this, when you don't know how many lists that you will need to traverse? Is this easily done in SKILL? Or, will I have to brute force it using elemental list access, like so?
listOfLists = '((1 2 3) (4 5 6) (7 8 9))
for(j 1 length(car(listOfLists))
string = ""
string = sprintf(nil "%s %L" string nthelem(j l))
Do you know a better way? Please remember that I do not know the number of lists in the listOfLists a priori
(although I do know the lists are all the same length); otherwise, I would use the structure from the first example ...
Originally posted in cdnusers.org by m27315