I don’t expect this to be useful in practice, but what would be the more elegant way to associate mutable values with a type, analogous to class attributes in Python? I thought of this question after reading an example method that could replace constant class attributes by returning a value based on argument type:
rank(x::General) = 1