Miranda respondsTo
From Erights
__respondsTo/2 is a Miranda message for asking whether an object understands a message.
__respondsTo/2
Returns a boolean indicating whether this object responds to messages with the verb verb and arity (number of arguments) arity.
The Miranda method for E-language objects is:
- If this object has a method with the given verb and arity, return true.
- If there is a Miranda method with the given verb and arity, return true.
- If the object has a matcher, return the result of invoking the matcher with the __respondsTo message. If the matcher does not match, return false.
- Return false.
XXX confirm this is an accurate description of current behavior.