mapSecond

inline fun <A, B, R> Pair<A, B>.mapSecond(transform: (B) -> R): Pair<A, R>

Returns a new Pair whose second component is the result of transform applied to the current second component.

The first component is carried over unchanged.

Parameters

transform

mapping applied to the second component.


inline fun <A, B, C, R> Triple<A, B, C>.mapSecond(transform: (B) -> R): Triple<A, R, C>

Returns a new Triple whose second component is the result of transform applied to the current second component.

The other components are carried over unchanged.

Parameters

transform

mapping applied to the second component.