fun keywordfun defines named functions and anonymous functions.
Type annotations are optional. A function without type annotations is assumed to take any type as an argument, and may return any type.
You can also use fun to declare anonymous functions, sometimes
called lambdas.