A generic function to reduce a list into a single value, valid operands are "+", "-", "﹡", "/" and the boolean operands "&" and "|". Note that using "+" and "﹡" equals the sum() and product() functions, and using "&" and "|" matches all() and any().
reduce([100, 20, 3], "-") = 77reduce([200, 10, 2], "/") = 10reduce(values, "﹡") = Multiplies every element of values, same as product(values)reduce(values, this.operand) = Applies the local field operand to each of the valuesreduce(["⭐", 3], "﹡") = "⭐⭐⭐", same as "⭐" ﹡ 3reduce([1]), "+") = 1, has the side effect of reducing the list into a single element