}
@Override
public boolean checkInstance(Object o) {
if (o instanceof KFn) {
KFn fn=(KFn)o;
if (!returnType.contains(fn.getReturnType())) return false; // covariance on return type
for (int i=0; i<arity; i++) {
if (!fn.getParamType(i).contains(paramTypes[i])) return false; // contravariance on parameter type
}
return true;
} else if (o instanceof IFn) {
// we can't assume anything about an arbitrary IFn.....
return true;