-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Description
Hello, please add a _collection.toMap(keySelector, [valueSelector])
function, so I can do this:
collection.toMap(x => x.key)
instead of this:
new Map(collection.map(x => [x.key, x]))
Please also add .toMap()
to the groupBy()
result so I can do this:
.groupBy(x => x.key).toMap(x => x.Key, x => x)
instead of this:
new Map(.groupBy(x => x.key).map((values, key): [string, T[]] => [key, values]).value())
Inspiration: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.todictionary?view=net-9.0
Metadata
Metadata
Assignees
Labels
No labels