Enum

product_by/2

product_by(enumerable, fun)

Maps and computes the product of the given enumerable in one pass.

Raises ArithmeticError if fun returns a non-numeric value.