Consider the code below
julia> function foo(f;FuncType="UnivariateFunction")
foo_backend(f,FuncType=FuncType)
end
foo (generic function with 1 method)
julia> function foo_backend(f;FuncType="UnivariateFunction")
println("Function Type is ",FuncType)
end
foo_backend (generic function with 1 method)
julia> func1(x) = x^2
func1 (generic function with 1 method)
julia> func2(x,y) = x^2 + y^2
func2 (generic function with 1 method)
julia> foo(func2,FuncType="MultivariateFunction")
Function Type is MultivariateFunction
Why doesn’t the code “foo_backend(f,FuncType=FuncType)” evaluate to
foo_backend(f,“MultivariateFunction”=“MultivariateFunction”)
when it is called with foo(func2,FuncType=“MultivariateFunction”)
I am just curious