New features:
- lambdas:
\x y. x + y
- subprograms:
with x y start output x; output y; end
- partial application of both lambdas and subprograms
- both of them can be stored in regular variables
- both of them have their own memory scopes
- some builtin functions: trigonometric, type-converting, combinators
Known issues:
- Сlosures are not working properly. When using a variable from outer scope inside a body of callable, it won't be captured. Instead, value will be got from closest available scope at the time of calling. See this example:
outer_var = "root scope";
lambda = \x. x + outer_var;
# next line is anonymous subprogram call
do start
outer_var = "subprog scope";
output lambda "I am a value from ";
# will output "I am a value from subprog scope";
end;
# will output "I am a value from root scope";
lambda "I am a value from ";