| 1 |
module imports.ice10857a; |
| 2 |
|
| 3 |
template filter(alias pred) |
| 4 |
{ |
| 5 |
auto filter(Range)(Range rs) |
| 6 |
{ |
| 7 |
return FilterResult!(pred, Range)(rs); |
| 8 |
} |
| 9 |
} |
| 10 |
|
| 11 |
private struct FilterResult(alias pred, R) |
| 12 |
{ |
| 13 |
R _input; |
| 14 |
|
| 15 |
void popFront() |
| 16 |
{ |
| 17 |
assert(pred(_input[0]) == 123); |
| 18 |
} |
| 19 |
} |