Just stumbled upon that I would like to transform a specific container to another specific container, and it looks like I have to take special care about Julia’s UnionAll types.
Concretely, I would like to map say Vector{<:Number}
to MyVector{<:Number}
.
What I thought could do the trick is a function like the following
f(::Type{Vector{<:T}}) where T = T
however
f(Vector{<:Number})
raises the error ERROR: UndefVarError: T not defined
Is something like this not supported in Julia? What could be a workaround?
thanks a lot