digitalmars.D.bugs - [Issue 6110] New: std.functional: unaryFun should take an array alias.
- d-bugmail puremagic.com (28/28) Jun 05 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6110
- d-bugmail puremagic.com (8/8) Jun 13 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6110
http://d.puremagic.com/issues/show_bug.cgi?id=6110 Summary: std.functional: unaryFun should take an array alias. Product: D Version: future Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch --- Comment #0 from timon.gehr gmx.ch 2011-06-05 15:55:36 PDT --- I find myself writing code similar to the following quite a lot: auto bbb = new bool[MAX]; auto arr = new int[MAX]; //... writeln(filter!((a){return bbb[a];})(arr)); I think that it should be possible to do writeln(filter!bbb(arr)); for the same effect. It is generally useful to use an array as a function that maps integral indexes to the element type of the array. Therefore, I propose to improve unaryFun so that it implements the proposed semantics. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 05 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6110 timon.gehr gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 13 2011