Skip to content

Commit

Permalink
Use init=Inf for minimum docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jun 8, 2020
1 parent 32d7f93 commit 3e7b09c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/reduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ than or equal to any other element) that will be returned for empty collections.
julia> minimum(length, ["Julion", "Julia", "Jule"])
4
julia> minimum(length, []; init=-1)
-1
julia> minimum(length, []; init=Inf)
Inf
```
"""
minimum(f, a; kw...) = mapreduce(f, min, a; kw...)
Expand Down Expand Up @@ -742,8 +742,8 @@ ERROR: ArgumentError: reducing over an empty collection is not allowed
Stacktrace:
[...]
julia> minimum([]; init=-1)
-1
julia> minimum([]; init=Inf)
Inf
```
"""
minimum(a; kw...) = mapreduce(identity, min, a; kw...)
Expand Down

0 comments on commit 3e7b09c

Please sign in to comment.