Major
Nice to have
Bugfix
Major
Enhancement
(User-visible)
In a block, name = expr can be used to define a "local variable" that can be accessed in later expressions in that block. A self-defined function (like $plus3 in the example) can be called just like a built-in method($plus3(4)).
{plus3 = x -> $x + 3; op = fun -> $fun(3) * $fun(4); $op($plus3); }
Result is 42.0.
As with buit-in methods, functions with multiple arguments can be called with the (arg, ..., arg) shorthand notation:
{add = x -> y -> $x + $y; $add(6, 7); }
Is equivalent to:
{add = x -> y -> $x + $y; $add(6)(7); }
Test
- test.com.top_logic.model.search.expr.TestSearchExpression