-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LINQ SelectAggregate #26945
Comments
nit: Note that, at least in database land, running aggregates are normally part of windowing functions. Parallelization (in PLINQ) would be a pain, but likely possible. |
Note that F# already has a very similar function: let array = [| 1; 2; 3 |]
let sumArray = array |> Seq.scan (fun seed item -> seed + item) 0 |> Seq.toArray Though there seems to be one difference between |
It could be the same. I just think the seed is something we put it directly so we know about it beforehand. It could be prepend directly so it not necessary But it's fine to have consistency with F#. I just think it convenient |
There is also |
Nice suggestion! I want to use it!!! But, how about rename the suggesting method to MoreLinq that is LINQ extension library has Haskell and Scala have And many Rx frameworks have I think that |
In the interest of keeping the Linq API surface small, we would need to assess the popularity of such an addition before we commit to it. My impression is that |
@eiriktsarpalis I don't think Another issue is Another usage of scan is using in conjunction with |
I mean that sounds fine to me. Alternatively folks that need such a pattern can easily either write their own extension method or use one of the many third-party libraries that provide LINQ extensions. |
I wish we could have select that could also keep state of aggregation and continue the iteration, send the aggregation to the next select
It should be simple to add this
The text was updated successfully, but these errors were encountered: