I think the issue originates in defining functions in list. The fs and dfs passed in the example are of function type whereas what I was passing was something else. I’m still trying to figure it out.
More about the issue: Another community post : )
I got as far as defining the functions as fs(x::Number, b::Number) = x^b
and dfs(x::Number, b::Number) = b*x^(b-1)
but I don’t know how to fill them in a vector or specific length. What I eventually want is a vector\list like [c1.f1 c2.f2 c3.f3…cn.fn] where ci is cost and fi is fs defined here. I also expect another error here that since b is a parameter I define earlier, and use it in this code, I want to just pass in b, but it’s not a number and I suspect it throwing up error.
Kindly let me know how to get around this. Any help is deeply appreciated!