Stride

Produces a alias sequence consisting of every nth element of Args, starting with the first.

Members

Aliases

Stride
alias Stride = AliasSeq!(Args[0], Stride!(n, Args[n..$]))
Undocumented in source.
Stride
alias Stride = AliasSeq!(Args[0])
Undocumented in source.
Stride
alias Stride = AliasSeq!()
Undocumented in source.

Parameters

n

Step.

Args

The items to stride.

Return Value

Alias sequence of every nth element of Args.

Examples

static assert(Stride!(3, 1, 2, 3, 4, 5, 6, 7, 8) == AliasSeq!(1, 4, 7));
static assert(Stride!(2, 1, 2, 3) == AliasSeq!(1, 3));
static assert(Stride!(2, 1, 2) == AliasSeq!(1));
static assert(Stride!(2, 1) == AliasSeq!(1));
static assert(Stride!(1, 1, 2, 3) == AliasSeq!(1, 2, 3));
static assert(is(Stride!3 == AliasSeq!()));

Meta