The OpenD Programming Language

FrontTransversal

Given a range of ranges, iterate transversally through the first elements of each of the enclosed ranges.

Constructors

this
this(RangeOfRanges input)

Construction from an input.

Members

Functions

moveAt
ElementType moveAt(size_t n)

Random-access primitive. It is offered if isRandomAccessRange!RangeOfRanges && (opt == TransverseOptions.assumeNotJagged || opt == TransverseOptions.enforceNotJagged).

moveBack
ElementType moveBack()

Bidirectional primitives. They are offered if isBidirectionalRange!RangeOfRanges.

moveFront
ElementType moveFront()

Forward range primitives.

opIndex
auto ref opIndex(size_t n)
opIndexAssign
void opIndexAssign(ElementType val, size_t n)

Random-access primitive. It is offered if isRandomAccessRange!RangeOfRanges && (opt == TransverseOptions.assumeNotJagged || opt == TransverseOptions.enforceNotJagged).

opSlice
typeof(this) opSlice(size_t lower, size_t upper)

Slicing if offered if RangeOfRanges supports slicing and all the conditions for supporting indexing are met.

popBack
void popBack()

Bidirectional primitives. They are offered if isBidirectionalRange!RangeOfRanges.

popFront
void popFront()

Forward range primitives.

Properties

back
auto ref back [@property getter]

Bidirectional primitives. They are offered if isBidirectionalRange!RangeOfRanges.

front
auto ref front [@property getter]

Forward range primitives.

save
FrontTransversal save [@property getter]

Duplicates this frontTransversal. Note that only the encapsulating range of range will be duplicated. Underlying ranges will not be duplicated.

Variables

empty
enum bool empty;

Forward range primitives.

Examples

import std.algorithm.comparison : equal;
int[][] x = new int[][2];
x[0] = [1, 2];
x[1] = [3, 4];
auto ror = frontTransversal(x);
assert(equal(ror, [ 1, 3 ][]));

Meta