Le mercredi 06 avril 2016 à 16:09 +0200, Didier Verna a écrit :
>   Can somebody please explain this to me:
> 
> julia> foo(args...) = args
> foo (generic function with 1 method)
> 
> foo(1)
> (1,)
> 
> i.e., why the trailing comma ?
julia> (1)
1

julia> (1,)
(1,)

The first syntax returns an integer: only the second one returns a
tuple. Parentheses alone only group terms, they don't create a tuple.


Regards

Reply via email to