October 2019
Intermediate to advanced
444 pages
10h 37m
English
Just a few steps need to be followed in order to learn more about pattern matching:
fn literal_match(choice: usize) -> String { match choice { 0 | 1 => "zero or one".to_owned(), 2 ... 9 => "two to nine".to_owned(), 10 => "ten".to_owned(), _ => "anything else".to_owned() }}
fn tuple_match(choices: ...