Testing Whether an Object Responds to a Method Call

If you need to know whether an item can respond to a certain method call, use the method can-respond in Object.tz. As with is, this method is used like a statement that returns true or false:

    if (item can-respond to "sing-and-dance"): item sing-and-dance.