Skip to content

Commit

Permalink
Unify function references in docs (JuliaLang#23535)
Browse files Browse the repository at this point in the history
* Unify function references by removing misleading ()

* review fix
  • Loading branch information
fredrikekre committed Sep 4, 2017
1 parent 75ec2b9 commit 54a2b01
Show file tree
Hide file tree
Showing 42 changed files with 443 additions and 443 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Library improvements

* The `crc32c` function for CRC-32c checksums is now exported ([#22274]).

* The output of `versioninfo()` is now controlled with keyword arguments ([#21974]).
* The output of `versioninfo` is now controlled with keyword arguments ([#21974]).

* The function `LibGit2.set_remote_url` now always sets both the fetch and push URLs for a
git repo. Additionally, the argument order was changed to be consistent with the git
Expand Down Expand Up @@ -889,7 +889,7 @@ Deprecated or removed
`pop!(ENV, k, def)`. Be aware that `pop!` returns `k` or `def`, whereas `delete!`
returns `ENV` or `def` ([#18012]).

* infix operator `$` has been deprecated in favor of infix `` or function `xor()` ([#18977]).
* infix operator `$` has been deprecated in favor of infix `` or function `xor` ([#18977]).

* The single-argument form of `write` (`write(x)`, with implicit `STDOUT` output stream),
has been deprecated in favor of the explicit equivalent `write(STDOUT, x)` ([#17654]).
Expand Down
8 changes: 4 additions & 4 deletions base/asyncmap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ up to 100 tasks will be used for concurrent mapping.
`ntasks` can also be specified as a zero-arg function. In this case, the
number of tasks to run in parallel is checked before processing every element and a new
task started if the value of `ntasks_func()` is less than the current number
task started if the value of `ntasks_func` is less than the current number
of tasks.
If `batch_size` is specified, the collection is processed in batch mode. `f` must
Expand Down Expand Up @@ -285,7 +285,7 @@ Returns an iterator which applies `f` to each element of `c` asynchronously
and collects output into `results`.
Keyword args `ntasks` and `batch_size` have the same behavior as in
[`asyncmap()`](@ref). If `batch_size` is specified, `f` must
[`asyncmap`](@ref). If `batch_size` is specified, `f` must
be a function which operates on an array of argument tuples.
!!! note
Expand Down Expand Up @@ -360,7 +360,7 @@ end
Apply `f` to each element of `c` using at most `ntasks` asynchronous tasks.
Keyword args `ntasks` and `batch_size` have the same behavior as in
[`asyncmap()`](@ref). If `batch_size` is specified, `f` must
[`asyncmap`](@ref). If `batch_size` is specified, `f` must
be a function which operates on an array of argument tuples.
!!! note
Expand Down Expand Up @@ -415,7 +415,7 @@ length(itr::AsyncGenerator) = length(itr.collector.enumerator)
"""
asyncmap!(f, results, c...; ntasks=0, batch_size=nothing)
Like [`asyncmap()`](@ref), but stores output in `results` rather than
Like [`asyncmap`](@ref), but stores output in `results` rather than
returning a collection.
"""
function asyncmap!(f, r, c1, c...; ntasks=0, batch_size=nothing)
Expand Down
2 changes: 1 addition & 1 deletion base/distributed/remotecall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ RemoteChannel(pid::Integer=myid()) = RemoteChannel{Channel{Any}}(pid, RRID())
"""
RemoteChannel(f::Function, pid::Integer=myid())
Create references to remote channels of a specific size and type. `f()` is a function that
Create references to remote channels of a specific size and type. `f` is a function that
when executed on `pid` must return an implementation of an `AbstractChannel`.
For example, `RemoteChannel(()->Channel{Int}(10), pid)`, will return a reference to a
Expand Down
2 changes: 1 addition & 1 deletion base/distributed/workerpool.jl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const _default_worker_pool = Ref{Nullable}(Nullable{WorkerPool}())
"""
default_worker_pool()
`WorkerPool` containing idle `workers()` - used by `remote(f)` and [`pmap`](@ref) (by default).
`WorkerPool` containing idle `workers` - used by `remote(f)` and [`pmap`](@ref) (by default).
"""
function default_worker_pool()
# On workers retrieve the default worker pool from the master when accessed
Expand Down
4 changes: 2 additions & 2 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ kw"primitive type"
"""
`macro` defines a method to include generated code in the final body of a program. A
macro maps a tuple of arguments to a returned expression, and the resulting expression
is compiled directly rather than requiring a runtime `eval()` call. Macro arguments may
is compiled directly rather than requiring a runtime `eval` call. Macro arguments may
include expressions, literal values, and symbols. For example:
macro sayhello(name)
Expand Down Expand Up @@ -189,7 +189,7 @@ modify the global variable `z`:
julia> z
6
Without the `global` declaration in `foo()`, a new local variable would have been
Without the `global` declaration in `foo`, a new local variable would have been
created inside foo(), and the `z` in the global scope would have remained equal to `3`.
"""
kw"global"
Expand Down
2 changes: 1 addition & 1 deletion base/env.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ end
"""
withenv(f::Function, kv::Pair...)
Execute `f()` in an environment that is temporarily modified (not replaced as in `setenv`)
Execute `f` in an environment that is temporarily modified (not replaced as in `setenv`)
by zero or more `"var"=>val` arguments `kv`. `withenv` is generally used via the
`withenv(kv...) do ... end` syntax. A value of `nothing` can be used to temporarily unset an
environment variable (if it is set). When `withenv` returns, the original environment has
Expand Down
2 changes: 1 addition & 1 deletion base/indices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ _maybetail(t::Tuple) = tail(t)
Represent an AbstractUnitRange of indices as a vector of the indices themselves.
Upon calling `to_indices()`, Colons are converted to Slice objects to represent
Upon calling `to_indices`, Colons are converted to Slice objects to represent
the indices over which the Colon spans. Slice objects are themselves unit
ranges with the same indices as those they wrap. This means that indexing into
Slice objects with an integer always returns that exact integer, and they
Expand Down
2 changes: 1 addition & 1 deletion base/printf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ end
"""
@printf([io::IOStream], "%Fmt", args...)
Print `args` using C `printf()` style format specification string, with some caveats:
Print `args` using C `printf` style format specification string, with some caveats:
`Inf` and `NaN` are printed consistently as `Inf` and `NaN` for flags `%a`, `%A`,
`%e`, `%E`, `%f`, `%F`, `%g`, and `%G`. Furthermore, if a floating point number is
equally close to the numeric values of two possible output strings, the output
Expand Down
2 changes: 1 addition & 1 deletion doc/src/devdocs/ast.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Julia ASTs

Julia has two representations of code. First there is a surface syntax AST returned by the parser
(e.g. the [`parse()`](@ref) function), and manipulated by macros. It is a structured representation
(e.g. the [`parse`](@ref) function), and manipulated by macros. It is a structured representation
of code as it is written, constructed by `julia-parser.scm` from a character stream. Next there
is a lowered form, or IR (intermediate representation), which is used by type inference and code
generation. In the lowered form there are fewer types of nodes, all macros are expanded, and all
Expand Down
18 changes: 9 additions & 9 deletions doc/src/devdocs/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ returns symbols for all bindings in `m`, regardless of export status.

## DataType fields

The names of `DataType` fields may be interrogated using [`fieldnames()`](@ref). For example,
The names of `DataType` fields may be interrogated using [`fieldnames`](@ref). For example,
given the following type, `fieldnames(Point)` returns an arrays of [`Symbol`](@ref) elements representing
the field names:

Expand Down Expand Up @@ -49,7 +49,7 @@ of these fields is the `types` field observed in the example above.

## Subtypes

The *direct* subtypes of any `DataType` may be listed using [`subtypes()`](@ref). For example,
The *direct* subtypes of any `DataType` may be listed using [`subtypes`](@ref). For example,
the abstract `DataType` [`AbstractFloat`](@ref) has four (concrete) subtypes:

```jldoctest
Expand All @@ -62,7 +62,7 @@ julia> subtypes(AbstractFloat)
```

Any abstract subtype will also be included in this list, but further subtypes thereof will not;
recursive application of [`subtypes()`](@ref) may be used to inspect the full type tree.
recursive application of [`subtypes`](@ref) may be used to inspect the full type tree.

## DataType layout

Expand All @@ -73,12 +73,12 @@ returns the (byte) offset for field *i* relative to the start of the type.

## Function methods

The methods of any generic function may be listed using [`methods()`](@ref). The method dispatch
table may be searched for methods accepting a given type using [`methodswith()`](@ref).
The methods of any generic function may be listed using [`methods`](@ref). The method dispatch
table may be searched for methods accepting a given type using [`methodswith`](@ref).

## Expansion and lowering

As discussed in the [Metaprogramming](@ref) section, the [`macroexpand()`](@ref) function gives
As discussed in the [Metaprogramming](@ref) section, the [`macroexpand`](@ref) function gives
the unquoted and interpolated expression (`Expr`) form for a given macro. To use `macroexpand`,
`quote` the expression block itself (otherwise, the macro will be evaluated and the result will
be passed instead!). For example:
Expand All @@ -88,10 +88,10 @@ julia> macroexpand(@__MODULE__, :(@edit println("")) )
:((Base.edit)(println, (Base.typesof)("")))
```

The functions `Base.Meta.show_sexpr()` and [`dump()`](@ref) are used to display S-expr style views
The functions `Base.Meta.show_sexpr` and [`dump`](@ref) are used to display S-expr style views
and depth-nested detail views for any expression.

Finally, the [`expand()`](@ref) function gives the `lowered` form of any expression and is of
Finally, the [`expand`](@ref) function gives the `lowered` form of any expression and is of
particular interest for understanding both macros and top-level statements such as function declarations
and variable assignments:

Expand All @@ -113,7 +113,7 @@ Inspecting the lowered form for functions requires selection of the specific met
because generic functions may have many methods with different type signatures. For this purpose,
method-specific code-lowering is available using [`code_lowered(f::Function, (Argtypes...))`](@ref),
and the type-inferred form is available using [`code_typed(f::Function, (Argtypes...))`](@ref).
[`code_warntype(f::Function, (Argtypes...))`](@ref) adds highlighting to the output of [`code_typed()`](@ref)
[`code_warntype(f::Function, (Argtypes...))`](@ref) adds highlighting to the output of [`code_typed`](@ref)
(see [`@code_warntype`](@ref)).

Closer to the machine, the LLVM intermediate representation of a function may be printed using
Expand Down
2 changes: 1 addition & 1 deletion doc/src/devdocs/stdio.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $ echo hello | julia -e 'println(typeof((STDIN, STDOUT, STDERR)))' | cat
Tuple{Base.PipeEndpoint,Base.PipeEndpoint,Base.TTY}
```

The [`Base.read()`](@ref) and [`Base.write()`](@ref) methods for these streams use [`ccall`](@ref)
The [`Base.read`](@ref) and [`Base.write`](@ref) methods for these streams use [`ccall`](@ref)
to call libuv wrappers in `src/jl_uv.c`, e.g.:

```
Expand Down
2 changes: 1 addition & 1 deletion doc/src/devdocs/sysimg.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Julia session, type:
include(joinpath(JULIA_HOME, Base.DATAROOTDIR, "julia", "build_sysimg.jl"))
```

This will include a `build_sysimg()` function:
This will include a `build_sysimg` function:

```@docs
BuildSysImg.build_sysimg
Expand Down
Loading

0 comments on commit 54a2b01

Please sign in to comment.