-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Proposal: Extended Aggregate Query Operator #9060
Comments
I have several comments:
|
|
I meant something like: from parent in parents
from child in parent.Children
selectby First() Would this compile? What would it return? Based on reading MSDN, I think the closest VB code is: From parent In parents
Aggregate child In parent.Children
Into First() This will return parents.Select(parent => new { parent, First = parent.Children.First() }) (Note that I'm just trying to compare hypothetical C# with similar code in existing VB, I don't think C# should copy this behavior.) |
@svick I see. In C# the query must be ended with a So to keep this explicitness, I would like to suggest use the previous from item in list
select item by Sum()
from item in list
select item.Key by ToDictionary(item.Value) This one seems like a backward partial application. In this case I think considering other functions like from item in list
select item.Value by Take(5)
list.Select(item => item.Value).Take(5) In this example, since |
Currently VB's
Aggregate Into
accepts an aggregate function with the following signatures (§11.21.12):The idea is to extend it to accept more arguments,
Same semantics can be added to C#'s(see #100)select
to alter the projecting function, ...The text was updated successfully, but these errors were encountered: