summaryrefslogblamecommitdiff
path: root/meap/meap-code/ch2/ch2-first-steps.rs
blob: 341b0618a72ea4a936bb6ab11e1ee8ca9b2b100d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                
fn main() {
  let a      = 10; // <1>
  let b: i32 = 20; // <2>

  let c = add(a,  b);
  println!("a + b = {}", c);
}

fn add(i: i32, j: i32) -> i32 {
  i + j
}