let’s say I have a parametric type like:
struct Param{T <: AbstractFloat}
value::T
end
julia> p1 = Param(3.0)
Param{Float64}(3.0)
julia> p2 = Param(BigFloat(5.0) )
Param{BigFloat}(5.0)
how could I “tie” the type of argument b
in the following function?
function fun(a::Param{T <: AbstractFloat},
b::T)
println(a.value + b)
end
ERROR: UndefVarError: T not defined
thanks.