or download this
for i ( 0 .. n ) {
f( a[i] ); // the required stuff for a[]
f'( b[i] ); // the required stuff for b[]
g( a[i], b[i] ); // and whilst we have them, do something to, or a
+ccumulate some statistic, that might help the subsequent merge.
}