How to get the inner types of a parametric type

Hello! Is there a function that returns Real from Vector{Real}?

e. g.: paramtype(Vector{Real}) should return Real.

Bonus if it can be generalized for any data structure such as struct S{A, B, C} end (should return [A, B, C])


to get the parameters of object S, use


1 Like