You can just do:
@assert subtypes(Type) == [DataType, TypeConstructor, Union]
I just tested this:
julia> @time for i in 1:1000
@assert subtypes(Type) == [DataType, TypeConstructor, Union]
end
3.025415 seconds (767.00 k allocations: 224.075 MB, 0.49% gc time)
El sábado, 26 de diciembre de 2015, 12:52:51 (UTC-6), Ray Toal escribió:
>
> I noticed that
>
> *julia> **subtypes(Type)*
>
> *3-element Array{Any,1}:*
>
> * DataType *
>
> * TypeConstructor*
>
> * Union *
>
> and was wondering if there was any significance in the order of the
> subtypes. If not, could the method have produced a Set instead?
>
>