Skip to content

Commit 2b84499

Browse files
committed
Reflect the same changes to other docstrings
1 parent 791f93c commit 2b84499

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

base/reduce.jl

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,9 @@ The return type is `Int` for signed integers of less than system word size, and
509509
`UInt` for unsigned integers of less than system word size. For all other
510510
arguments, a common return type is found to which all arguments are promoted.
511511
512-
The value returned for empty `itr` can be specified by `init` which must be the
513-
additive identity. It is unspecified whether `init` is used for non-empty
514-
collections.
512+
The value returned for empty `itr` can be specified by `init`. It must be
513+
the additive identity (i.e. zero) as it is unspecified whether `init` is used
514+
for non-empty collections.
515515
516516
!!! compat "Julia 1.6"
517517
Keyword argument `init` requires Julia 1.6 or later.
@@ -536,9 +536,9 @@ The return type is `Int` for signed integers of less than system word size, and
536536
`UInt` for unsigned integers of less than system word size. For all other
537537
arguments, a common return type is found to which all arguments are promoted.
538538
539-
The value returned for empty `itr` can be specified by `init` which must be the
540-
multiplicative identity. It is unspecified whether `init` is used for non-empty
541-
collections.
539+
The value returned for empty `itr` can be specified by `init`. It must be the
540+
multiplicative identity (i.e. one) as it is unspecified whether `init` is used
541+
for non-empty collections.
542542
543543
!!! compat "Julia 1.6"
544544
Keyword argument `init` requires Julia 1.6 or later.
@@ -560,9 +560,9 @@ The return type is `Int` for signed integers of less than system word size, and
560560
`UInt` for unsigned integers of less than system word size. For all other
561561
arguments, a common return type is found to which all arguments are promoted.
562562
563-
The value returned for empty `itr` can be specified by `init` which must be the
564-
multiplicative identity. It is unspecified whether `init` is used for non-empty
565-
collections.
563+
The value returned for empty `itr` can be specified by `init`. It must be the
564+
multiplicative identity (i.e. one) as it is unspecified whether `init` is used
565+
for non-empty collections.
566566
567567
!!! compat "Julia 1.6"
568568
Keyword argument `init` requires Julia 1.6 or later.
@@ -644,7 +644,7 @@ end
644644
Returns the largest result of calling function `f` on each element of `itr`.
645645
646646
If provided, `init` must be a neutral element for `max` (i.e. which is less
647-
than any other element) that will be returned for empty collections.
647+
than or equal to any other element) that will be returned for empty collections.
648648
649649
!!! compat "Julia 1.6"
650650
Keyword argument `init` requires Julia 1.6 or later.
@@ -664,8 +664,9 @@ maximum(f, a; kw...) = mapreduce(f, max, a; kw...)
664664
minimum(f, itr; [init])
665665
666666
Returns the smallest result of calling function `f` on each element of `itr`.
667-
If provided, `init` must be a neutral element for `min` that will be returned
668-
for empty collections.
667+
668+
If provided, `init` must be a neutral element for `min` (i.e. which is greater
669+
than or equal to any other element) that will be returned for empty collections.
669670
670671
!!! compat "Julia 1.6"
671672
Keyword argument `init` requires Julia 1.6 or later.

0 commit comments

Comments
 (0)