On 10/17/2014 11:35 AM, Tofu Ninja wrote:

> I am not even sure any more, I am starting to get lost in the tuple
> madness...

You want to write a function that takes an index and a number of arrays; and returns an N-ary Tuple where N matches the number arrays passed to the function: :p

  assert(multiAccess(0, [42], "s") == Tuple!(int, char)(42, 's'));

And it should work with any number of parameters. Second elements of three arrays:

  assert(multiAccess(1, [42, 100], "hello", "world")
         == Tuple!(int, char, char)(100, 'e', 'o'));

Ali

Reply via email to