Function Procedure

Gilda incorporates several interrelated features to help manage side effects. Functions are pure; which means they do not have side effects other than returning a value. They cannot modify their arguments nor any global variables, perform input or output operations, or raise or catch exceptions. They can only call other functions or methods that are also pure. Due to these restrictions they can freely be used in expressions without concern for side effects that would otherwise not be obvious.


Functions can be invoked using either functional or subroutine notations:


An example of a user defined function is: is.prime.gg

A set of intrinsic functions are built into Gilda. They perform common numeric and string operations and type casts.

Statement Syntax

Method Procedure