Functions in Bird are declared using the fn
keyword followed by
the function name and parameters. The function body is enclosed in curly braces.
Void functions do not return a value. The return type can be omitted from the function declaration.
Functions can have return types. The return type must by specified after the function name and parameters.
Functions in Bird are called using the function name followed by the arguments enclosed in parentheses.
Check out the playground!