File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -462,7 +462,7 @@ reduce(op, a::Number) = a # Do we want this?
462
462
# # sum
463
463
464
464
"""
465
- sum(f, itr; init)
465
+ sum(f, itr; [ init] )
466
466
467
467
Sum the results of calling function `f` on each element of `itr`.
468
468
@@ -501,7 +501,7 @@ overflow results in -128.
501
501
sum (f, a; kw... ) = mapreduce (f, add_sum, a; kw... )
502
502
503
503
"""
504
- sum(itr; init)
504
+ sum(itr; [ init] )
505
505
506
506
Returns the sum of all elements in a collection.
507
507
@@ -529,7 +529,7 @@ sum(a::AbstractArray{Bool}; kw...) = count(a)
529
529
530
530
# # prod
531
531
"""
532
- prod(f, itr; init)
532
+ prod(f, itr; [ init] )
533
533
534
534
Returns the product of `f` applied to each element of `itr`.
535
535
@@ -553,7 +553,7 @@ julia> prod(abs2, [2; 3; 4])
553
553
prod (f, a; kw... ) = mapreduce (f, mul_prod, a; kw... )
554
554
555
555
"""
556
- prod(itr; init)
556
+ prod(itr; [ init] )
557
557
558
558
Returns the product of all elements of a collection.
559
559
You can’t perform that action at this time.
0 commit comments