Forum Discussion
JHunt
7 years agoCommunity Hero
I wasn't aware you could get the key and value for a MapEntry as a parameter in a Closure passed to each. I always ended up writing "it.key" and "it.entry", which was a bit painful, so thanks for that.
I think I need to start writing collect more often since I tend to overuse each.
You may find the attached answer an improvement over my last one.
Related Content
Recent Discussions
- 2 days ago
- 2 days ago