mirror of
https://github.com/dlang/phobos.git
synced 2025-05-05 17:42:58 +03:00
Update iteration.d UT comment
This commit is contained in:
parent
b26bcb70fb
commit
4150b2bb84
1 changed files with 2 additions and 2 deletions
|
@ -1116,11 +1116,11 @@ if (is(typeof(unaryFun!predicate)))
|
|||
|
||||
int[] arr = [ 1, 2, 3, 4, 5 ];
|
||||
|
||||
// Sum all elements
|
||||
// Filter below 3
|
||||
auto small = filter!(a => a < 3)(arr);
|
||||
assert(equal(small, [ 1, 2 ]));
|
||||
|
||||
// Sum again, but with Uniform Function Call Syntax (UFCS)
|
||||
// Filter again, but with Uniform Function Call Syntax (UFCS)
|
||||
auto sum = arr.filter!(a => a < 3);
|
||||
assert(equal(sum, [ 1, 2 ]));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue