Primitive type: function

Primitive type: function


The scripting language allows you to define custom functions.


A piece of code enclosed in curly braces defines a function.

A function can be called using parentheses, for example function(argument:value).


Functions can be composed using the + operator, evaluating a + b first evaluates a and uses its result as input for b:

 example := to_upper + { "result == {input}" }
 example("xyz") == "result == XYZ"

Multiple functions can be changed together like this, this is especially convenient in combination with default arguments.


 example := { a + b }
 example(a: 1, b: 2) == 3