What about adding: ```fun <T, R> Pair<Ite...
# stdlib
c
What about adding:
Copy code
fun <T, R> Pair<Iterable<T>, Iterable<T>>.mapEach(transform: (T) -> R): Pair<Iterable<R>, Iterable<R>> {
    val (left, right) = this
    return left.map(transform) to right.map(transform)
}
The use-case would be mapping after a call to
.partition
:
Copy code
…
    .partition { it.isSuccessful }
    .mapEach { it.id }
I find that it's something I do relatively often
first
and
second
, but yeah that's the same function
Not really, I just did the deconstruction by habit
👍 1
well, the point isn't the exact way to implement this function, but to discuss whether it should exist