copy

fun copy(first: A, second: B): Pair<A, B>(source)

Creates a new pair using both explicitly supplied component values.

Neither argument has a default. To retain a component, pass first or second explicitly. Stored objects are shared; this function does not clone them.

Return

a new pair containing the supplied values.

Parameters

first

first component of the new pair.

second

second component of the new pair.