You could use a const Ref
to hold the data:
const GeneralRank = Ref(1)
rank(::Type{General}) = GeneralRank[]
rank(x::General) = rank(typeof(x))
set_rank!(::Type{General}, value) = GeneralRank[] = value
etc...
You could use a const Ref
to hold the data:
const GeneralRank = Ref(1)
rank(::Type{General}) = GeneralRank[]
rank(x::General) = rank(typeof(x))
set_rank!(::Type{General}, value) = GeneralRank[] = value
etc...