I\'m trying to process triplets in a list. Imperatively, I could do this:
for(i = 1; i < list.length-1; i++) { process( list[i-1], list[i], list[i+1]
I know you got the answer you wanted, but the technically correct answer is no. There's no general method that takes a list and returns tuples of variable arity because there's no way to represent that type signature in Scala at the present.