title: Kotlin list to EnumMap with sums
body: <p>I have to migrate my project to Kotlin. Later, I questioned  <a href="https://stackoverflow.com/questions/41732240/java-8-list-to-enummap-with-sums">this issue</a>. And I really can't get how to implement it in Kotlin. I know about 'associateBy' function, but it doesn't have that amount of arguments that Java 8 'groupBy' has.  Is it a way to implement it with lambdas. If not, how can I implement this algorithm without it?</p>