[nem-en] Re: [proposal] foldr1/foldl1
Kamil Skalski
kamil.skalski at gmail.com
Sun Jul 1 17:11:23 CEST 2007
I think that FoldLeft and FoldRight are ok - the overloading
resolution will work fine for them, especially since they have
different number of parameters than existing ones.
Please send me a hash generated at
https://nemerle.org/svnaccount.php
2007/7/1, Elifant <elifantu at mail.ru>:
> Kamil Skalski пишет:
>
> > Very nice functions indeed. It would be also nice to have a general
> > extension methods operating on IEnumerable [T] doing the same things,
> > so the functionality won't be limited to lists (which should have
> > their own specialized implementation as you provided).
>
> So how to name it? FoldLeft1 or FoldLeft overload?
>
> > Will you commit the changes or prepare a patch?
>
> I can commit. Is SVN public-writeable?
>
> >> I propose to add functions like Haskell's foldr1 and foldl1 to standard
> >> library. They are very convenient
> >> when result has the same type and element type has no "zero" value with
> >> respect to the applied operation.
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list