eliminate cast

Dee Girl deegirl at noreply.com
Wed May 14 10:29:57 PDT 2008


Simen Kjaeraas Wrote:

> Dee Girl <deegirl at noreply.com> wrote:
> 
> > If you have two arrays and want to map over them you do:
> >
> > arr1 ~ arr2 /map/ &atoi;
> >
> > But with map you do:
> >
> > map!(atoi)(arr1, arr2);
> 
> That's one of the reasons we want better tuples.
> 
> (arr1, arr2) /map/ &atoi;
> 
> -- Simen

I search for tuple in std.algorithm. Good to have source! I found in the mismatch function. So I think this should work:

tuple(arr1, arr2) /map/ &atoi;

This can work? If it works then maybe it is better because syntax is not ambiguous. For a new comer, it seems D people care about syntax very much! This is good. ^_^ Thank you, Dee Girl



More information about the Digitalmars-d mailing list