Skip to content

Commit 3ceaaae

Browse files
tkftimholy
andcommitted
Improve extrema docstring
Co-authored-by: Tim Holy <tim.holy@gmail.com>
1 parent ce07cbf commit 3ceaaae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

base/reduce.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,10 +793,9 @@ as a 2-tuple.
793793
794794
The value returned for empty `itr` can be specified by `init`. It must be a 2-tuple whose
795795
first and second elements are neutral elements for `min` and `max` respectively
796-
(i.e. which are greater/less than or equal to any other element). It is used for non-empty
797-
collections. Note: it implies that, for empty `itr`, the returned value `(mn, mx)` satisfies
798-
`mn ≥ mx` even though for non-empty `itr` it satisfies `mn ≤ mx`. This is a "paradoxical"
799-
but yet expected result.
796+
(i.e. which are greater/less than or equal to any other element). As a consequence, when
797+
`itr` is empty the returned `(mn, mx)` tuple will satisfy `mn ≥ mx`. When `init` is
798+
specified it may be used even for non-empty `itr`.
800799
801800
!!! compat "Julia 1.8"
802801
Keyword argument `init` requires Julia 1.8 or later.

0 commit comments

Comments
 (0)