Calculator
examples/advanced-functions/calculator/src/main.rs
fn add(x: i32, y: i32) -> i32 { x + y } fn multiply(x: i32, y: i32) -> i32 { x * y } fn main() { let table: HashMap<String, fn(i32, i32) = let op = "+"; }
fn add(x: i32, y: i32) -> i32 { x + y } fn multiply(x: i32, y: i32) -> i32 { x * y } fn main() { let table: HashMap<String, fn(i32, i32) = let op = "+"; }