[Issue 12592] std.algorithm.keep?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 10 20:18:25 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=12592
Seb <greensunny12 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |greensunny12 at gmail.com
--- Comment #3 from Seb <greensunny12 at gmail.com> ---
We have group and filter, e.g.
---
import std.stdio;
void main() {
import std.algorithm;
immutable data = [10, 3, 2, 3, 4, 10];
assert(data.dup.sort.release.group.map!(a => a[0]).equal([2, 3, 4, 10]));
}
---
https://run.dlang.io/is/eBLeSa
Closing as WORKSFORME. Plese reopen if you feel that filter and group don't
work for or you have more arguments or examples.
--
More information about the Digitalmars-d-bugs
mailing list