The Many Faces of D - slides

Simen kjaeraas simen.kjaras at gmail.com
Sun Oct 3 16:28:17 PDT 2010


Peter Alexander <peter.alexander.au at gmail.com> wrote:

> It would be nice if we could just write:
>
> assert(equal(iota(1,6).filter!("a&1").map!("2*a"), [2,6,10]));
>
> Incidentally, why doesn't the uniform function call syntax allow this?

Mostly because it isn't implemented yet, I think. Well, it is for arrays,
but not for any other type, like the lazier ranges returned from iota,
filter and map.

-- 
Simen


More information about the Digitalmars-d mailing list