Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix accumulate examples not using the init keyword #28910

Merged
merged 2 commits into from
Sep 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions doc/src/manual/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,16 +621,17 @@ the Julia documentation itself. For example:

```julia
"""
accumulate!(op, y, x)
tryparse(type, str; base)

Cumulative operation `op` on a vector `x`, storing the result in `y`. See also [`accumulate`](@ref).
Like [`parse`](@ref), but returns either a value of the requested type,
or [`nothing`](@ref) if the string does not contain a valid number.
"""
```

This will create a link in the generated docs to the `accumulate` documentation
(which has more information about what this function actually does). It's good to include
cross references to mutating/non-mutating versions of a function, or to highlight a difference
between two similar-seeming functions.
This will create a link in the generated docs to the [`parse`](@ref) documentation
(which has more information about what this function actually does), and to the
[`nothing`](@ref) documentation. It's good to include cross references to mutating/non-mutating
versions of a function, or to highlight a difference between two similar-seeming functions.

!!! note
The above cross referencing is *not* a Markdown feature, and relies on
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/parallel-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ julia> function g_fix(r)
g_fix (generic function with 1 method)

julia> r = let m = MersenneTwister(1)
[m; accumulate(Future.randjump, m, fill(big(10)^20, nthreads()-1))]
[m; accumulate(Future.randjump, fill(big(10)^20, nthreads()-1), init=m)]
end;

julia> g_fix(r)
Expand Down