feature request: N-ary map
Ali Çehreli
acehreli at yahoo.com
Fri Jun 21 16:02:30 PDT 2013
On 06/21/2013 03:57 PM, Diggory wrote:
> On Friday, 21 June 2013 at 22:56:04 UTC, Andrei Alexandrescu wrote:
>> On 6/21/13 3:55 PM, Andrei Alexandrescu wrote:
>>> On 6/21/13 3:45 PM, Timothee Cour wrote:
>>>> I'd like to support N-ary map, ie std.algorithm.map that takes 1 or
>>>> more
>>>> ranges as arguments and operates lazily on those.
> You can use "zip" from std.range.
Timothee specifically said that he is trying to avoid zip: :)
> before:
> zip(a,b).map!(u=>absDiff(u[0],u[1])).reduce!fun;
> after:
> map!absDiff(a,b).reduce!fun;
Ali
More information about the Digitalmars-d
mailing list