The Function¶
As in functional programming, MNL treats a function as a first-class citizen, meaning it can be bound to names, passed as an argument, and returned from another function. MNL has two types of function blocks: The function block and the lambda block. The lambda block is an expression block that takes two inputs: a parameter and an expression block. On the other hand, the function block is a declarative block that consists of three inputs: an identifier (a name), a parameter, and an expression block.
The Lambda Block¶
A lambda function, also known as an anonymous function, is a function that does not have a name. Figure 1 shows an incomplete lambda block, while Figures 2 to 4 provide examples of how to construct a lambda block.

Fig. 1: The lambda block

Fig. 2: The lambda block with the empty parameter and return a string

Fig. 3: The lambda block with a string input and produce a string output
Naming a lambda block can be achieved by connecting the variable block with the lambda block.

Fig. 4: Lambda binding with a name.
The Function block¶
MNL simplifies the connection between the lambda block and the variable block within a single declaration block known as a function block.

Fig. 5: The function block
Example¶
Tail Function¶

Fig. 6: The tail function
Two or more parameters¶
The core language of MNL is the lambda calculus, which takes one parameter. However, MNL can use a tuple or a record to accommodate two or more inputs as parameters. The examples below illustrate how to group two inputs into a single parameter.
Tuple¶

Fig. 7: A tuple as the function parameter
Record¶

Fig. 8: A record as the function parameter