Operations on tuples
CopyableTuple
ExtendedTupleOps
ImmutableTuple
of CopyableTuple<T, U> for (T, U)
of ImmutableTuple<T, U> for (T, U)
of ExtendedTupleOps<A, B> for (&[A], &[B])
of ExtendedTupleOps<A, B> for (~[A], ~[B])
CopyableTuple
first
fn first() -> T
second
fn second() -> U
swap
fn swap() -> (U, T)
ExtendedTupleOps
zip
fn zip() -> ~[(A, B)]
map
fn map<C>(f: &fn(a: &A, b: &B) -> C) -> ~[C]
ImmutableTuple
first_ref
fn first_ref() -> &self /T
second_ref
fn second_ref() -> &self /U
CopyableTuple<T, U>
for (T, U)
first
fn first() -> T
Return the first element of self
second
fn second() -> U
Return the second element of self
swap
fn swap() -> (U, T)
Return the results of swapping the two elements of self
ImmutableTuple<T, U>
for (T, U)
first_ref
fn first_ref() -> &self /T
second_ref
fn second_ref() -> &self /U
ExtendedTupleOps<A, B>
for (&[A], &[B])
zip
fn zip() -> ~[(A, B)]
map
fn map<C>(f: &fn(a: &A, b: &B) -> C) -> ~[C]
ExtendedTupleOps<A, B>
for (~[A], ~[B])
zip
fn zip() -> ~[(A, B)]
map
fn map<C>(f: &fn(a: &A, b: &B) -> C) -> ~[C]