mapBoth
inline fun <A, B, C, D> Pair<A, B>.mapBoth(transformFirst: (A) -> C, transformSecond: (B) -> D): Pair<C, D>
Returns a new Pair with both components transformed independently.
Equivalent to mapFirst(transformFirst).mapSecond(transformSecond) in a single call.
Parameters
transformFirst
mapping applied to the first component.
transformSecond
mapping applied to the second component.