Provides many useful tools related to tuples
rust
let a = (1, 2, 3);
let b = a.map(|v| v * 3);
assert_eq!(b, (3, 6, 9));
rust
let a = (1, 2, 3, 4, 5);
let b = a.map3(|v| v * 5);
assert_eq!(b, (1, 2, 3, 20, 5));
rust
let a = (1, 2, 3);
let b = a.map_all(|v| v * 10, |v| v * 100, |v| v * 1000);
assert_eq!(b, (10, 200, 3000));
rust
let t = (5, 6, 7);
let (a, b, c) = t.as_ref();
assert_eq!(*a, 5);
assert_eq!(*b, 6);
assert_eq!(*c, 7);
rust
let a = (&1, &2, &3);
let b = a.cloned();
assert_eq!(b, (1, 2, 3))
rust
let a = ((1, 2, 3), (4, 5, 6), (7, 8, 9));
let b = a.flatten();
assert_eq!(b, (1, 2, 3, 4, 5, 6, 7, 8, 9));
meta ```rust let a = (1, 2, 3, 4, 5); assert_eq!(a.arity(), 5);
let b = (); assert_eq!(b.arity(), 0); ```
rust
let a = (1, 2, 3)
.into_iter()
.map(|v| v * 3)
.collect_tuple::<tuple![3;]>();
let b: (i32, i32, i32) = (3, 6, 9);
assert_eq!(a, b);
rust
let a = (1, 2, 3)
.into_iter()
.map(|v| v * 3)
.try_collect_tuple::<tuple![3;]>();
let b: Option<(i32, i32, i32)> = Some((3, 6, 9));
assert_eq!(a, b);
rust
let a = (1, 2, 3)
.into_iter()
.map(|v| v * 3)
.collect_tuple_try::<tuple![3;]>();
let b: (Option<i32>, Option<i32>, Option<i32>) = (Some(3), Some(6), Some(9));
assert_eq!(a, b);
transpose ```rust let a = Some((1, 2, 3)).transpose(); assert_eq!(a, (Some(1), Some(2), Some(3)));
let b = (Some(1), Some(2), Some(3)).transpose();
asserteq!(b, Some((1, 2, 3)));
rust
let a: (Result
rust
let a: (Result
combin ```rust let a = (1, 2).pushright(3); asserteq!(a, (1, 2, 3));
let b = (2, 1).pushleft(3); asserteq!(b, (3, 2, 1));
let c = (1, 2, 3).concat((4, 5, 6)); assert_eq!(c, (1, 2, 3, 4, 5, 6)) ```
split
split_parts ```rust let t = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
let a = t.split2parts(); assert_eq!(a, ((0, 1, 2, 3, 4), (5, 6, 7, 8, 9)));
let b = t.split3parts(); assert_eq!(b, ((0, 1, 2, 3), (4, 5, 6), (7, 8, 9)));
let c = t.split4parts(); assert_eq!(c, ((0, 1, 2), (3, 4, 5), (6, 7), (8, 9)));
let d = t.split5parts(); assert_eq!(d, ((0, 1), (2, 3), (4, 5), (6, 7), (8, 9))); ```
split_at ```rust let t = (1, 2, 3, 4, 5, 6);
let a = t.splitat1(); assert_eq!(a, (1, (2, 3, 4, 5, 6)));
let b = t.splitat3(); assert_eq!(b, ((1, 2, 3), (4, 5, 6)));
let c = t.splitat5(); assert_eq!(c, ((1, 2, 3, 4, 5), 6)); ```
split_by ```rust let t = (1, 2, 3, 4, 5, 6); let t2 = (1, 2, 3, 4, 5);
let a = t.splitby2(); assert_eq!(a, ((1, 2), (3, 4), (5, 6)));
let b = t2.splitby2(); assert_eq!(b, ((1, 2), (3, 4), 5));
let c = t.splitby3(); assert_eq!(c, ((1, 2, 3), (4, 5, 6)));
let d = t2.splitby3(); assert_eq!(d, ((1, 2, 3), (4, 5)));
let e = t.splitby6(); assert_eq!(e, ((1, 2, 3, 4, 5, 6))); ```
splittotuple_at ```rust let t = (1, 2, 3, 4, 5, 6);
let a = t.splittotupleat1(); assert_eq!(a, ((1,), (2, 3, 4, 5, 6)));
let b = t.splittotupleat3(); assert_eq!(b, ((1, 2, 3), (4, 5, 6)));
let c = t.splittotupleat5(); assert_eq!(c, ((1, 2, 3, 4, 5), (6,))); ```
splittotuple_by ```rust let t = (1, 2, 3, 4, 5, 6); let t2 = (1, 2, 3, 4, 5);
let a = t.splittotupleby2(); assert_eq!(a, ((1, 2), (3, 4), (5, 6)));
let b = t2.splittotupleby2(); assert_eq!(b, ((1, 2), (3, 4), (5,)));
let c = t.splittotupleby3(); assert_eq!(c, ((1, 2, 3), (4, 5, 6)));
let d = t2.splittotupleby3(); assert_eq!(d, ((1, 2, 3), (4, 5)));
let e = t.splittotupleby6(); assert_eq!(e, (((1, 2, 3, 4, 5, 6),))); ```