Parameters as dicts



Is there any possibility to define default parameters as a dictionary or something similar?

I have a function

f(a;b=1,c=2) = a+b+c

Now I would like to define b and c in a dict structure like this:

params = Dict(b=>2,c=>2)

to be able to call

f(1,params) or f(1,params...) or something similar.

That would come in handy :wink:

Thanks in advance!


Dict(:b=>2, :c=>2)

f(1; params...)


Thanks. That symbol thing makes more sense :slight_smile: I’m not into it but it definitely sounds reasonable.