[nem-en] Re: [svn] r6370: nemerle/trunk:
lib/narray.nncc/testsuite/completion-playground/compl3.n
vc
vc at rsdn.ru
Mon Sep 4 19:08:47 CEST 2006
> -----Original Message-----
> From: devel-en-bounces at nemerle.org [mailto:devel-en-
> bounces at nemerle.org] On Behalf Of Michal Moskal
> Sent: Monday, September 04, 2006 11:40 AM
> To: devel-en at nemerle.org
> Subject: [nem-en] Re: [svn] r6370: nemerle/trunk:
> lib/narray.nncc/testsuite/completion-playground/compl3.n
>
> On 6/6/06, VladD2 <svnadmin at nemerle.org> wrote:
> > + /**
> > + * Convert array of one type to other.
> > + */
> > + public ConvertTo[From, To] (this sourse : array [From], f :
From
> -> To) : array [To]
> > + {
> > + mutable dest = array(sourse.Length);
> > +
> > + for (mutable i = 0; i < sourse.Length; i++)
> > + dest[i] = f (sourse[i]);
> > +
> > + dest;
> > + }
>
> The same function is defined below as "Map".
Oh. Yes. I fix it.
But, I think we must add alias "ConvertAll" (like System.Array.
ConvertAll()). For imperative programmers with C/C++/C#/Java background
"Map" it is impossible to understand. (ConvertTo is a compromise caused by
error in extension methods implementation)
More information about the devel-en
mailing list