diff --git a/base/reduce.jl b/base/reduce.jl index 093742ce2e008..fc70825eff4b3 100644 --- a/base/reduce.jl +++ b/base/reduce.jl @@ -78,6 +78,10 @@ function prod(itr) return v end +function mean(itr) + return sum(itr) / numel(itr) +end + function reduce(op::Function, v0, itr) v = v0 if is(op,max)