Skip to content

Commit

Permalink
Add compat annotation for accumulate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Mar 26, 2020
1 parent 78a6c44 commit 7a4d7fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/accumulate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ also [`accumulate!`](@ref) to use a preallocated output array, both for performa
to control the precision of the output (e.g. to avoid overflow). For common operations
there are specialized variants of `accumulate`, see: [`cumsum`](@ref), [`cumprod`](@ref)
!!! compat "Julia 1.5"
`accumulate` on a non-array iterator requires at least Julia 1.5.
# Examples
```jldoctest
julia> accumulate(+, [1,2,3])
Expand Down
3 changes: 3 additions & 0 deletions base/iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@ next element of `itr`.
This is effectively a lazy version of [`Base.accumulate`](@ref).
!!! compat "Julia 1.5"
Keyword argument `init` is added in Julia 1.5.
# Examples
```jldoctest
julia> f = Iterators.accumulate(+, [1,2,3,4]);
Expand Down

0 comments on commit 7a4d7fe

Please sign in to comment.