Functions¶
Keel functions use the following syntax:
They're called with name(arg1, arg2, ..., argN). A function can also not take any arguments as input.
Functions can be defined at the toplevel or inside other functions.
The main function is special. It doesn't take any arguments, and any Keel file used as the program's entry point must define a main function.
Keel supports function polymorphism (and does compile-time monomorphization), meaning that a single function can operate on arguments of different types. For example: