Skip to content

Instantly share code, notes, and snippets.

@theoremoon
Created January 11, 2015 15:01
Show Gist options
  • Save theoremoon/16fbd8e3d3d972a87a6a to your computer and use it in GitHub Desktop.
Save theoremoon/16fbd8e3d3d972a87a6a to your computer and use it in GitHub Desktop.
fn hello(){
println!("Hello");
}
fn print_number(x: i32){
println!("{}", x);
}
fn print_numbers(x: i32, y: i32){
println!("{}, {}", x, y);
}
fn add_one(x: i32) -> i32 {
x + 1
}
fn main(){
hello();
print_number(32);
print_numbers(10, 20);
let x = add_one(1);
print_number(x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment