Skip to content

Commit 3e7b09c

Browse files
committed
Use init=Inf for minimum docstring
1 parent 32d7f93 commit 3e7b09c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

base/reduce.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,8 @@ than or equal to any other element) that will be returned for empty collections.
682682
julia> minimum(length, ["Julion", "Julia", "Jule"])
683683
4
684684
685-
julia> minimum(length, []; init=-1)
686-
-1
685+
julia> minimum(length, []; init=Inf)
686+
Inf
687687
```
688688
"""
689689
minimum(f, a; kw...) = mapreduce(f, min, a; kw...)
@@ -742,8 +742,8 @@ ERROR: ArgumentError: reducing over an empty collection is not allowed
742742
Stacktrace:
743743
[...]
744744
745-
julia> minimum([]; init=-1)
746-
-1
745+
julia> minimum([]; init=Inf)
746+
Inf
747747
```
748748
"""
749749
minimum(a; kw...) = mapreduce(identity, min, a; kw...)

0 commit comments

Comments
 (0)