This post provides a good introduction to functions in Rust, including their purpose, how to declare and call them, and the use of parameters and return values.
Table of contents
What is a function?BasicsParametersMultiple ParametersStatements and ExpressionsReturn ValuesEarly ReturnsRecapSort: