trFilter

Passes only values satisfying the given predicate to the next layer.

trFilter
(
alias pred
R
)
(
auto ref R r
)

Examples

int a = 2;
int b = 3;
int[] results;
foreach (i; 0..10)
	(i)
		.trOnly
		.trFilter!(n => n % a == 0)
		.trFilter!(n => n % b == 0)
		.trEach!((int n) { results ~= n; });
assert(results == [0, 6]);

Meta