final Sequence zero = args[1];
final Sequence input = args[0];
result = foldRight(ref, zero, input, contextSequence);
} else if (isCalledAs("map-pairs")) {
final FunctionReference ref = (FunctionReference) args[0];
ref.analyze(cachedContextInfo);
final SequenceIterator i1 = args[1].iterate();
final SequenceIterator i2 = args[2].iterate();
while (i1.hasNext() && i2.hasNext()) {
final Sequence r = ref.evalFunction(contextSequence, null,
new Sequence[] { i1.nextItem().toSequence(), i2.nextItem().toSequence() });