isPartitioned

bool
isPartitioned
(
alias pred
Range
)
(
Range r
)
if ()

Parameters

pred

The predicate that the range should be partitioned by.

r Range

The range to check.

Return Value

Type: bool

true if r is partitioned according to predicate pred.

Examples

int[] r = [ 1, 3, 5, 7, 8, 2, 4, ];
assert(isPartitioned!"a & 1"(r));

Meta

Suggestion Box / Bug Report