Join Slack
Powered by
Q: Does the stdlib have an associate-like function...
# stdlib
n
natpryce
08/09/2020, 8:40 AM
Q: Does the stdlib have an associate-like function that takes a function to merge elements with duplicate keys (similar to Collectors.toMap in Java Streams)?
d
diesieben07
08/09/2020, 9:44 AM
collection.groupingBy { it.key }.aggreate
diesieben07
08/09/2020, 9:49 AM
An example:
https://pl.kotl.in/odFrseo2k
n
natpryce
08/09/2020, 12:36 PM
Awesome!
3
Views
Open in Slack
Previous
Next