[Issue 9841] std.algorithm.iFilter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 10 23:27:47 UTC 2018


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

Seb <greensunny12 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12 at gmail.com

--- Comment #1 from Seb <greensunny12 at gmail.com> ---
So summarizing the status quo in D is:

---
auto names2 = ["Sam", "Pamela", "Dave", "Pascal", "Erik"];
auto nameRange2 = names2.enumerate.filter!(a => a.value.length <=
a.index).map!(a => a.value);
nameRange2.writeln;
---

https://run.dlang.io/is/SzLRES

It's not too bad and I doubt that filterIndex would be accepted.

--


More information about the Digitalmars-d-bugs mailing list