Skip to content

Commit 31feb69

Browse files
committed
Tweak docstring signature style
1 parent c3e66a5 commit 31feb69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

base/reduce.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ reduce(op, a::Number) = a # Do we want this?
462462
## sum
463463

464464
"""
465-
sum(f, itr; init)
465+
sum(f, itr; [init])
466466
467467
Sum the results of calling function `f` on each element of `itr`.
468468
@@ -501,7 +501,7 @@ overflow results in -128.
501501
sum(f, a; kw...) = mapreduce(f, add_sum, a; kw...)
502502

503503
"""
504-
sum(itr; init)
504+
sum(itr; [init])
505505
506506
Returns the sum of all elements in a collection.
507507
@@ -529,7 +529,7 @@ sum(a::AbstractArray{Bool}; kw...) = count(a)
529529

530530
## prod
531531
"""
532-
prod(f, itr; init)
532+
prod(f, itr; [init])
533533
534534
Returns the product of `f` applied to each element of `itr`.
535535
@@ -553,7 +553,7 @@ julia> prod(abs2, [2; 3; 4])
553553
prod(f, a; kw...) = mapreduce(f, mul_prod, a; kw...)
554554

555555
"""
556-
prod(itr; init)
556+
prod(itr; [init])
557557
558558
Returns the product of all elements of a collection.
559559

0 commit comments

Comments
 (0)