- fn
Rust hello world function
- We can declare functions with other names using the fn keyword.
- The relative location of the functions does not matter. There is no need to defined headers.
- We can call the functions by writing their name followed by a pair of parenthesis.
examples/functions/hello-world/src/main.rs
fn main() { greet(); } fn greet() { println!("Hello World!"); }