Group By

Apr 25, 2013 at 4:05 PM
I find the Linq.js GroupBy a little confusing. What is the reason for the Key property on the result of a GroupBy being a function that returns the key, rather than the key itself?

Also, why does the GroupBy result have a source property (notice the difference in casing) rather than something like Values?

Thanks.
Coordinator
Apr 29, 2013 at 2:51 PM
Edited Apr 29, 2013 at 2:53 PM
result of GroupBy have to keep immutable.
source property intend to private field.
linq.js ver.3 changed Key() -> key() and source -> getSource()
(and getSource is private but practically public)