Generalizing functions to accept inputs with 1 or 2 (or with 2 or 3) dimensions

That seems to work with keyword arguments just fine:

julia> f(x,y...;z=3) = println(x,y,z)
f (generic function with 1 method)

julia> f(1,2,3,z=4)
1(2, 3)4

1 Like

I meant an optional positional argument, but switching to a keyword argument is easy enough.