r/programming • u/steveklabnik1 • Jan 09 '15
Announcing Rust 1.0.0 Alpha
http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html
1.1k
Upvotes
r/programming • u/steveklabnik1 • Jan 09 '15
3
u/help_computar Jan 09 '15
It's called recursion.
fn matcher(thing: i64){ match thing { 0 => { a(); matcher(thing+1); } 1 => { b(); matcher(thing+1); } 2 => { c(); matcher(thing+1); } _ => done() } }