use pairwise reduction for sum(f, A) and prod(f, A) via new (non-exported) mapreduce_associative