Inline function expression

A function can be built directly by specifying its parameters and its body as expression. Types are optional and by default, assumed to be item*.

Function items can also be produced with a partial function application.

Example 38. Inline function expression

           function ($x as integer, $y as integer) as integer { $x + 2 },
           function ($x) { $x + 2 }
       

Result. (two function items)


The semantics of inline function expressions follow the W3C specification.

Figure 24. InlineFunctionExpr

InlineFunctionExpr

Figure 25. ParamList

ParamList