Skip to content

Commit

Permalink
Changed one identifier in one example (#29279)
Browse files Browse the repository at this point in the history
The example used identifier `x` for two different purposes. While this isn't a problem for Julia, it makes humans have to read much more carefully. For examples I think it is much clearer to use different identifiers for different purposes.

(cherry picked from commit 6354405)
  • Loading branch information
mark-summerfield authored and KristofferC committed Feb 11, 2019
1 parent 0ba4231 commit a172858
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2043,11 +2043,11 @@ collection. `destination` must be at least as large as the first collection.
# Examples
```jldoctest
julia> x = zeros(3);
julia> a = zeros(3);
julia> map!(x -> x * 2, x, [1, 2, 3]);
julia> map!(x -> x * 2, a, [1, 2, 3]);
julia> x
julia> a
3-element Array{Float64,1}:
2.0
4.0
Expand Down

0 comments on commit a172858

Please sign in to comment.