[Issue 5756] amap() and maybe afilter() too
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 23 23:50:24 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5756
--- Comment #1 from bearophile_hugs at eml.cc 2011-03-23 23:47:04 PDT ---
As in std.parallelism, I suggest to add a second optional argument to the
amap()/afilter(), an optional buffer to return the result. If the buffer is
provided, it must be the same length as the range.
So you write:
auto numbers = iota(10);
auto squareRoots = new double[numbers.length];
amap!sqrt(numbers, squareRoots);
Instead of:
auto numbers = iota(10);
auto squareRoots = new double[numbers.length];
copy(map!sqrt(numbers), squareRoots);
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list