Feature request: argMinBy
Author: tobiasBoraCreated Jun 17, 2026Updated Jun 17, 2026
Sorry to bother you with my feature requests, but I wanted to have an `argMin`/`argMinBy` function for Maps, something like `minBy`, except that it should return the key (not just the value) leading to this minimum value. One can use `List(mymap).sortBy(…).first()` but it is not only a bit too verbose, but more importantly we pay an extra `log` factor (finding a minimum is simpler than sorting a whole list), even with `Seq` since `sortBy` is eager.
Source: immutable-js/immutable-js