min
09/25/2026, 10:24 AMmapFirst method or something like it that I can use to apply a function to each Pair<T, U> in a sequence/collection/etc to map to a Pair<V, U>?Vampire
09/25/2026, 10:40 AMfun <X, Y, Z> Iterable<Pair<X, Y>>.mapFirst(transform: (X) -> Z) =
map { (x, y) -> Pair(transform(x), y) }