On Tue, Feb 23, 2016 at 6:59 AM, Alex <[email protected]> wrote:
> Hi all,
>
> Why the following code doesn't work?
>
> function boo(x, y)
> x*y
> end
>
>
> function foo(a, b, x...)
> boo(x)
boo(x...)
> end
>
> z=3,4
>
> foo(1,2,z)
^ This won't work
> foo(1,2,z...)
>
> ERROR: LoadError: MethodError: `boo` has no method matching
> boo(::Tuple{Tuple{Int64,Int64}})
>
> According to the documentation :
>
>> it is often handy to “splice” the values contained in an iterable
>> collection into a function call as individual arguments.
>>
>> To do this, one also uses ... but in the function call instead
>
>
> I used ... in a function call, but it doesn't help.