mardi 25 juin 2019

How to get the default value of an optional parameter julia?

It is possible to get the values from a struct by using getproperty. I am interested in the same thing but for optional/default arguments.

How would I proceed to achieve this in Julia?

function foo(a,b,c=1)
...
end
getDefaultArg(foo)
=> (c, 1)





Aucun commentaire:

Enregistrer un commentaire