|
|
|
|
|
by davidwf
1964 days ago
|
|
I am not a language expert, but Clojure (inspired by CLOS IIRC) does method resolution based on an arbitrary function that can ask any "is it a duck?" question of the arguments: https://clojure.org/about/runtime_polymorphism It's common for code to "choose" which method to call based on the class of the arguments, but it's also common to choose which method based on whether a particular key is in the hashmap, etc. |
|