mirror of
https://github.com/dlang/phobos.git
synced 2025-05-08 12:07:15 +03:00
Fix Ddoc warnings
This commit is contained in:
parent
00cbd34e78
commit
b8a88558a9
7 changed files with 21 additions and 17 deletions
|
@ -444,7 +444,7 @@ left to right for all elements $(D a) in $(D range). The original ranges are
|
||||||
not changed. Evaluation is done lazily.
|
not changed. Evaluation is done lazily.
|
||||||
|
|
||||||
Params:
|
Params:
|
||||||
fun = one or more functions
|
fun = one or more transformation functions
|
||||||
r = an $(REF_ALTTEXT input range, isInputRange, std,range,primitives)
|
r = an $(REF_ALTTEXT input range, isInputRange, std,range,primitives)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -2711,6 +2711,9 @@ seed (the range must be non-empty).
|
||||||
Returns:
|
Returns:
|
||||||
the accumulated $(D result)
|
the accumulated $(D result)
|
||||||
|
|
||||||
|
Params:
|
||||||
|
fun = one or more functions
|
||||||
|
|
||||||
See_Also:
|
See_Also:
|
||||||
$(HTTP en.wikipedia.org/wiki/Fold_(higher-order_function), Fold (higher-order function))
|
$(HTTP en.wikipedia.org/wiki/Fold_(higher-order_function), Fold (higher-order function))
|
||||||
|
|
||||||
|
@ -3238,6 +3241,10 @@ This function is also known as
|
||||||
$(HTTP docs.python.org/3/library/itertools.html#itertools.accumulate, accumulate),
|
$(HTTP docs.python.org/3/library/itertools.html#itertools.accumulate, accumulate),
|
||||||
$(HTTP hackage.haskell.org/package/base-4.8.2.0/docs/Prelude.html#v:scanl, scan),
|
$(HTTP hackage.haskell.org/package/base-4.8.2.0/docs/Prelude.html#v:scanl, scan),
|
||||||
$(HTTP mathworld.wolfram.com/CumulativeSum.html, Cumulative Sum).
|
$(HTTP mathworld.wolfram.com/CumulativeSum.html, Cumulative Sum).
|
||||||
|
|
||||||
|
Params:
|
||||||
|
fun = one or more functions to use as fold operation
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The function returns a range containing the consecutive reduced values. If
|
The function returns a range containing the consecutive reduced values. If
|
||||||
there is more than one `fun`, the element type will be $(REF Tuple,
|
there is more than one `fun`, the element type will be $(REF Tuple,
|
||||||
|
@ -3259,6 +3266,7 @@ if (fun.length >= 1)
|
||||||
`ElementType!R`.
|
`ElementType!R`.
|
||||||
Once `S` has been determined, then $(D S s = e;) and $(D s = f(s, e);) must
|
Once `S` has been determined, then $(D S s = e;) and $(D s = f(s, e);) must
|
||||||
both be legal.
|
both be legal.
|
||||||
|
|
||||||
Params:
|
Params:
|
||||||
range = An $(REF_ALTTEXT input range, isInputRange, std,range,primitives)
|
range = An $(REF_ALTTEXT input range, isInputRange, std,range,primitives)
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -3277,6 +3285,7 @@ if (fun.length >= 1)
|
||||||
For convenience, if the seed is `const`, or has qualified fields, then
|
For convenience, if the seed is `const`, or has qualified fields, then
|
||||||
`cumulativeFold` will operate on an unqualified copy. If this happens
|
`cumulativeFold` will operate on an unqualified copy. If this happens
|
||||||
then the returned type will not perfectly match `S`.
|
then the returned type will not perfectly match `S`.
|
||||||
|
|
||||||
Params:
|
Params:
|
||||||
range = An $(REF_ALTTEXT input range, isInputRange, std,range,primitives)
|
range = An $(REF_ALTTEXT input range, isInputRange, std,range,primitives)
|
||||||
seed = the initial value of the accumulator
|
seed = the initial value of the accumulator
|
||||||
|
|
|
@ -1877,7 +1877,7 @@ This overload converts an character input range to a `bool`.
|
||||||
|
|
||||||
Params:
|
Params:
|
||||||
Target = the type to convert to
|
Target = the type to convert to
|
||||||
s = the lvalue of an input range
|
source = the lvalue of an input range
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A `bool`
|
A `bool`
|
||||||
|
@ -2534,7 +2534,7 @@ if (isSomeString!Source && !is(Source == enum) &&
|
||||||
*
|
*
|
||||||
* Params:
|
* Params:
|
||||||
* Target = a floating point type
|
* Target = a floating point type
|
||||||
* p = the lvalue of the range to _parse
|
* source = the lvalue of the range to _parse
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* A floating point number of type `Target`
|
* A floating point number of type `Target`
|
||||||
|
|
|
@ -1612,18 +1612,18 @@ lengths = static array containing the size of each dimension
|
||||||
Returns:
|
Returns:
|
||||||
An N-dimensional array with individual elements of type T.
|
An N-dimensional array with individual elements of type T.
|
||||||
*/
|
*/
|
||||||
auto makeMultidimensionalArray(T, Allocator, size_t n)(auto ref Allocator alloc, size_t[n] lengths...)
|
auto makeMultidimensionalArray(T, Allocator, size_t N)(auto ref Allocator alloc, size_t[N] lengths...)
|
||||||
{
|
{
|
||||||
static if (n == 1)
|
static if (N == 1)
|
||||||
{
|
{
|
||||||
return makeArray!T(alloc, lengths[0]);
|
return makeArray!T(alloc, lengths[0]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alias E = typeof(makeMultidimensionalArray!(T, Allocator, n - 1)(alloc, lengths[1 .. $]));
|
alias E = typeof(makeMultidimensionalArray!(T, Allocator, N - 1)(alloc, lengths[1 .. $]));
|
||||||
auto ret = makeArray!E(alloc, lengths[0]);
|
auto ret = makeArray!E(alloc, lengths[0]);
|
||||||
foreach (ref e; ret)
|
foreach (ref e; ret)
|
||||||
e = makeMultidimensionalArray!(T, Allocator, n - 1)(alloc, lengths[1 .. $]);
|
e = makeMultidimensionalArray!(T, Allocator, N - 1)(alloc, lengths[1 .. $]);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -404,7 +404,6 @@ Params:
|
||||||
slice = input slice
|
slice = input slice
|
||||||
Dimensions = indexes of dimensions to be brought to the first position
|
Dimensions = indexes of dimensions to be brought to the first position
|
||||||
dimensions = indexes of dimensions to be brought to the first position
|
dimensions = indexes of dimensions to be brought to the first position
|
||||||
dimension = index of dimension to be brought to the first position
|
|
||||||
Returns:
|
Returns:
|
||||||
n-dimensional slice of the same type
|
n-dimensional slice of the same type
|
||||||
See_also: $(LREF swapped), $(LREF everted)
|
See_also: $(LREF swapped), $(LREF everted)
|
||||||
|
@ -535,7 +534,6 @@ Params:
|
||||||
slice = input slice
|
slice = input slice
|
||||||
Dimensions = indexes of dimensions to reverse order of iteration
|
Dimensions = indexes of dimensions to reverse order of iteration
|
||||||
dimensions = indexes of dimensions to reverse order of iteration
|
dimensions = indexes of dimensions to reverse order of iteration
|
||||||
dimension = index of dimension to reverse order of iteration
|
|
||||||
Returns:
|
Returns:
|
||||||
n-dimensional slice of the same type
|
n-dimensional slice of the same type
|
||||||
+/
|
+/
|
||||||
|
@ -641,8 +639,7 @@ Multiplies the stride of the selected dimension by a factor.
|
||||||
Params:
|
Params:
|
||||||
slice = input slice
|
slice = input slice
|
||||||
Dimensions = indexes of dimensions to be strided
|
Dimensions = indexes of dimensions to be strided
|
||||||
dimensions = indexes of dimensions to be strided
|
factors = list of step extension factor
|
||||||
factors = list of step extension factors
|
|
||||||
factor = step extension factors
|
factor = step extension factors
|
||||||
Returns:
|
Returns:
|
||||||
n-dimensional slice of the same type
|
n-dimensional slice of the same type
|
||||||
|
@ -996,7 +993,6 @@ This makes `dropExactly` faster than `drop`.
|
||||||
|
|
||||||
Params:
|
Params:
|
||||||
slice = input slice
|
slice = input slice
|
||||||
ns = list of numbers of elements to drop
|
|
||||||
n = number of elements to drop
|
n = number of elements to drop
|
||||||
Returns:
|
Returns:
|
||||||
n-dimensional slice of the same type
|
n-dimensional slice of the same type
|
||||||
|
|
|
@ -611,7 +611,6 @@ pure nothrow @system unittest
|
||||||
Creates an uninitialized array and an n-dimensional slice over it.
|
Creates an uninitialized array and an n-dimensional slice over it.
|
||||||
Params:
|
Params:
|
||||||
lengths = list of lengths for each dimension
|
lengths = list of lengths for each dimension
|
||||||
slice = slice to copy shape and data from
|
|
||||||
Returns:
|
Returns:
|
||||||
uninitialized n-dimensional slice
|
uninitialized n-dimensional slice
|
||||||
+/
|
+/
|
||||||
|
@ -749,8 +748,6 @@ See also $(MREF std, experimental, allocator).
|
||||||
Params:
|
Params:
|
||||||
alloc = allocator
|
alloc = allocator
|
||||||
lengths = list of lengths for each dimension
|
lengths = list of lengths for each dimension
|
||||||
init = default value for array initialization
|
|
||||||
slice = slice to copy shape and data from
|
|
||||||
Returns:
|
Returns:
|
||||||
a structure with fields `array` and `slice`
|
a structure with fields `array` and `slice`
|
||||||
+/
|
+/
|
||||||
|
|
|
@ -2877,13 +2877,13 @@ pure @safe nothrow @nogc unittest
|
||||||
|
|
||||||
/++
|
/++
|
||||||
Convenience function which calls
|
Convenience function which calls
|
||||||
`range.$(REF popFrontN, std, range, primitives)(n)) and returns `range`.
|
`range.$(REF popFrontN, std, range, primitives)(n) and returns `range`.
|
||||||
`drop` makes it easier to pop elements from a range
|
`drop` makes it easier to pop elements from a range
|
||||||
and then pass it to another function within a single expression,
|
and then pass it to another function within a single expression,
|
||||||
whereas `popFrontN` would require multiple statements.
|
whereas `popFrontN` would require multiple statements.
|
||||||
|
|
||||||
`dropBack` provides the same functionality but instead calls
|
`dropBack` provides the same functionality but instead calls
|
||||||
`range.$(REF popBackN, std, range, primitives)(n))
|
`range.$(REF popBackN, std, range, primitives)(n)
|
||||||
|
|
||||||
Note: `drop` and `dropBack` will only pop $(I up to)
|
Note: `drop` and `dropBack` will only pop $(I up to)
|
||||||
`n` elements but will stop if the range is empty first.
|
`n` elements but will stop if the range is empty first.
|
||||||
|
@ -9941,6 +9941,7 @@ bit, from the least significant bit to the most significant bit.
|
||||||
|
|
||||||
Params:
|
Params:
|
||||||
R = an integral input range to iterate over
|
R = an integral input range to iterate over
|
||||||
|
range = range to consume bit by by
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A `Bitwise` input range with propagated forward, bidirectional
|
A `Bitwise` input range with propagated forward, bidirectional
|
||||||
|
|
|
@ -3744,6 +3744,7 @@ int impureVariable;
|
||||||
*
|
*
|
||||||
* Params:
|
* Params:
|
||||||
* C = `char`, `wchar`, or `dchar`
|
* C = `char`, `wchar`, or `dchar`
|
||||||
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* A forward range if `R` is a range and not auto-decodable, as defined by
|
* A forward range if `R` is a range and not auto-decodable, as defined by
|
||||||
* $(REF isAutodecodableString, std, traits), and if the base range is
|
* $(REF isAutodecodableString, std, traits), and if the base range is
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue