Sorry if this has been asked before. I have functions that take vectors of functions as arguments, similarly to the following:

```
function g2(fs::Vector{Function}, x::Float64)::Float64
a::Float64 = 0.0
for f in fs
a += f(x)
end
a
end
```

Let’s say we define

```
julia> f1(x::Float64)::Float64 = sin(x);
julia> f2(x::Float64)::Float64 = cos(x);
julia> f3(x::Float64)::Float64 = tan(x);
```

Do the `Any`

in the following `@code_warntype`

indicate type instability? If so, is there a way to make `g2`

type stable?

```
julia> @code_warntype g2([f1, f2, f3], 3.14)
Variables:
#self#::#g2
fs::Array{Function,1}
x::Float64
a::Float64
#temp#::Int64
f::F
Body:
begin
SSAValue(0) = Main.Float64
SSAValue(1) = 0.0
a::Float64 = SSAValue(1) # line 3:
#temp#::Int64 = $(QuoteNode(1))
6:
unless (Base.box)(Base.Bool,(Base.not_int)((#temp#::Int64 === (Base.box)(Int64,(Base.add_int)((Base.arraylen)(fs::Array{Function,1})::Int64,1)))::Bool)) goto 17
SSAValue(5) = (Base.arrayref)(fs::Array{Function,1},#temp#::Int64)::F
SSAValue(6) = (Base.box)(Int64,(Base.add_int)(#temp#::Int64,1))
f::F = SSAValue(5)
#temp#::Int64 = SSAValue(6) # line 4:
SSAValue(4) = (a::Float64 + (f::F)(x::Float64)::Any)::Any
a::Float64 = (Core.typeassert)((Base.convert)(Main.Float64,SSAValue(4))::Any,Main.Float64)::Float64
15:
goto 6
17: # line 6:
return a::Float64
end::Float64
```

Is there a way to indicate that the input argument `fs`

should be a vector of `Functions`

each with a certain return type?

Thanks!