June 05, 2011 [Issue 6110] New: std.functional: unaryFun should take an array alias. | ||||
---|---|---|---|---|
| ||||
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: ------- |
June 13, 2011 [Issue 6110] std.functional: unaryFun should take an array alias. | ||||
---|---|---|---|---|
| ||||
Posted in reply to timon.gehr@gmx.ch | 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: ------- |
Copyright © 1999-2021 by the D Language Foundation