using Aggregate from Spring.Collections.Enumerable.pas
Issue #138
closed
We are using the famous Spring4D Framework. Recently i would like to use the Aggregate functions, defined in Spring.Collections.Enumerable.pas. This unit is not included in the package, so i cannot use it.
Is this a mistake? And why should i implicitly cast to an record, why are Aggregate functions not available in IEnumerable<T>?
So how can i use these functions. Do i have to tweak the packages myself?
Comments (2)
-
repo owner -
repo owner - changed status to closed
- Log in to comment
Spring.Collections.Enumerable.pas was an experiment that did not work as well as I hoped (compiler issues) - that is why this unit is not present in the packages. IEnumerable<T> cannot have any methods that take generic parameters that is why Aggregate and other methods that you might know from other languages are not present.
For 1.3 we want to extend Spring.Collections.TEnumerable to provide most of these missing methods. Until then you can write your own Aggregate method by extending (either by helper or inheriting from) Spring.Collections.TEnumerable
Please show your interest in improving the language by voting on following items: