[Issue 12592] std.algorithm.keep to filter range elements and write back to the source range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 12 16:25:17 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=12592

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|std.algorithm.keep?         |std.algorithm.keep to
                   |                            |filter range elements and
                   |                            |write back to the source
                   |                            |range

--- Comment #4 from Nick Treleaven <nick at geany.org> ---
> assert(data.dup.sort.release.group.map!(a => a[0]).equal([2, 3, 4, 10]));

map does not produce an array, that's the idea. In fact using `group.map` is
more complicated than just using `uniq`.

--


More information about the Digitalmars-d-bugs mailing list