add: predicate in sum(), product()