Operations on tuples
first
- Return the first element of a pairsecond
- Return the second element of a pairswap
- Return the results of swapping the two elements of a pairfirst
pure fn first<T: copy, U: copy>(pair: (T, U)) -> T
Return the first element of a pair
second
pure fn second<T: copy, U: copy>(pair: (T, U)) -> U
Return the second element of a pair
swap
pure fn swap<T: copy, U: copy>(pair: (T, U)) -> (U, T)
Return the results of swapping the two elements of a pair