 &gt; I honestly can&#x27;t think of a language that even support overloading of methods based on run time types.<p>Clojure does with multimethods ( <a href="http:&#x2F;&#x2F;clojure.org&#x2F;runtime_polymorphism" rel="nofollow">http:&#x2F;&#x2F;clojure.org&#x2F;runtime_polymorphism</a> ). I suspect lisp with meta object protocol does too, but I only heard about it, so can&#x27;t confirm.<p>EDIT: deleted my solution that worked without method overloading at all, cause I missed some constraints.