[nem-en] Re: [svn] r6370: nemerle/trunk: lib/narray.n ncc/testsuite/completion-playground/compl3.n

Michal Moskal michal.moskal at gmail.com
Mon Sep 4 09:40:23 CEST 2006


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".

-- 
   Michał


More information about the devel-en mailing list