std.range lockstep is not input range but opApply entity. Workarounds?

Simen Kjaeraas simen.kjaras at gmail.com
Sat Dec 29 15:50:19 PST 2012


On 2012-52-29 20:12, mist <none at none.none> wrote:

> Not clever enough to expand like this though:
> map!( (a, b) => a+b )( zip(Range1, Range2) );
>
> Using a => a[0]+a[1] is not that big deal though.

That oughta be doable. However, seeing as std.functional only contains
unaryFun and binaryFun (dranges has naryFun), this approach cannot
currently extend to tuples with more than two fields.

-- 
Simen


More information about the Digitalmars-d-learn mailing list