News for hackers. Stuff that matters.
Re:SQL: 2023 is finished: Here is what's new by brabel on Friday April 14, 2023 @06:38AM (#35567841)
I run into the equivalent problem in Kotlin sometimes. I want to group things by a key, but that results in type `Map<K, List<V>>` because the compiler can't be sure that there won't be more than one `V` for the field being used for grouping... which is why there's also `associateBy` which does return `Map<K, V>`, but will throw if there happens to be more than one value for each K.

Not relevant, but I thought it may help other readers understand the problem.

There are no comments on this comment yet.