mirror of
https://github.com/dlang/phobos.git
synced 2025-05-09 04:27:23 +03:00
Improved docs for std.range.zip
This commit is contained in:
parent
52b694570c
commit
c00e298ef6
1 changed files with 12 additions and 5 deletions
|
@ -3759,11 +3759,18 @@ private alias lengthType(R) = typeof(R.init.length.init);
|
||||||
`lockstep` allows reference access to the elements in
|
`lockstep` allows reference access to the elements in
|
||||||
`foreach` iterations.
|
`foreach` iterations.
|
||||||
|
|
||||||
$(D Zip) offers the lowest range facilities of all components, e.g. it
|
Params:
|
||||||
offers random access iff all ranges offer random access, and also
|
sp = controls what `zip` will do if the _ranges are different lengths
|
||||||
offers mutation and swapping if all ranges offer it. Due to this, $(D
|
ranges = the ranges to zip together
|
||||||
Zip) is extremely powerful because it allows manipulating several
|
Returns:
|
||||||
ranges in lockstep.
|
At minimum, an input range. `Zip` offers the lowest range facilities
|
||||||
|
of all components, e.g. it offers random access iff all ranges offer
|
||||||
|
random access, and also offers mutation and swapping if all ranges offer
|
||||||
|
it. Due to this, `Zip` is extremely powerful because it allows manipulating
|
||||||
|
several ranges in lockstep.
|
||||||
|
Throws:
|
||||||
|
An `Exception` if all of the _ranges are not the same length and
|
||||||
|
`sp` is set to `StoppingPolicy.requireSameLength`.
|
||||||
*/
|
*/
|
||||||
struct Zip(Ranges...)
|
struct Zip(Ranges...)
|
||||||
if (Ranges.length && allSatisfy!(isInputRange, Ranges))
|
if (Ranges.length && allSatisfy!(isInputRange, Ranges))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue