// item in the base sequence. The mapping function is essentially the "return"
// expression, wrapped in an EventMappingAction object that is responsible also for
// setting the range variable at each step.
SequenceIterator base = sequence.iterate(context);
EventMappingFunction map = new EventMappingAction(context, getLocalSlotNumber(), positionVariable, action);
return new EventMappingIterator(base, map);
}