Operations on tuples

Function first

pure fn first<T: copy, U: copy>(pair: (T, U)) -> T

Return the first element of a pair

Function second

pure fn second<T: copy, U: copy>(pair: (T, U)) -> U

Return the second element of a pair

Function swap

pure fn swap<T: copy, U: copy>(pair: (T, U)) -> (U, T)

Return the results of swapping the two elements of a pair