both

inline fun <T> Pair<T, T>.both(func: (T) -> Unit)

Perform the given function on both elements of this pair. The highest common type of both elements is used as the type of the parameter.