Calculates the product of a sequence of integers.
int prod(List<int> seq) { int result = 1; for (int num in seq) { result *= num; } return result; }