return true;
}
@Override
public Result<IValue> call(Type[] argTypes, IValue[] argValues, Map<String, IValue> keyArgValues) {
Failure f1 = null;
try {
try {
return getRight().call(argTypes, argValues, keyArgValues);
} catch(MatchFailed e) {
// try another one
} catch(Failure e) {
// try another one
}
return getLeft().call(argTypes, argValues, keyArgValues);
}
catch (MatchFailed e) {
List<AbstractFunction> candidates = Arrays.<AbstractFunction>asList((AbstractFunction) getLeft(), (AbstractFunction) getRight());
throw new ArgumentsMismatch("+ composition", candidates, argTypes, ctx.getCurrentAST());
}
catch(Failure f2) {
throw new Failure("Both functions in the '+' composition have failed:\n "
+ getLeft().toString() + ",\n" + getRight().toString());
}
}