[nem-en] Re: [proposal] foldr1/foldl1
Elifant
elifantu at mail.ru
Sun Jul 1 10:43:03 CEST 2007
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.
More information about the devel-en
mailing list