Join Slack
Powered by
whats the best way to get an exhaustive map? (with...
# stdlib
c
christophsturm
04/22/2022, 8:25 AM
whats the best way to get an exhaustive map? (with an enum as a key). I could use a when and copy its output to a map with a utility method that calls the when for every key. is there a better way?
m
mcpiroman
04/22/2022, 9:19 AM
You just mean something like
SomeEnum.values().associateWith { ... }
?
c
christophsturm
04/22/2022, 9:20 AM
yes
181
Views
Open in Slack
Previous
Next