fn main() {
let triple = (9, 5, 0, -4, 4.76, -21);
match triple {
(6, y, z, ..) => println!("0, {:?}, {:?}", y, z),
(3, ..) => println!("First = 3, the rest doesn't matter"),
(.., 7) => println!("Last = 7, the rest doesn't matter"),
(9, .., -21) => println!("First = 9, last = -21, the rest doesn't matter"),
_ => println!("else, doesn't matter"),
}
}
/*
run:
First = 9, last = -21, the rest doesn't matter
*/