Anatomy of a Function
We'll cover the following...
Alright, time to review what we know about functions and how they’re put together. From what we’ve seen, functions consist of:
Let’s look at some examples of this:
Press + to interact
fn subtract(x: i32, y: i32) -> i32 {x - y}
The function name is subtract
. It has a parameter list with two parameters. ...