Leo supports named function definitions that can contain one or more statements. Function names should be lowercase.
Functions can take one or more arguments. Each function argument must have a name followed by an explicit type.
Function arguments are passed by value from the calling function. There are no references in Leo.
const keyword to indicate that an argument is a constant value.
Doing this will constrain the function input to constant values only.
main function is the entry point of a Leo program.
main function arguments provide the inputs to the circuit.
They are allocated private variables in the program's constraint system.
Functions can return one or more values. Multiple values are returned as a tuple. Their types are explicitly stated in the function signature.
Functions can be called by their defined name followed by the typed arguments in parentheses
Functions in Leo have their own scope. There are no global variables.