{y+x*z}[1;2;3]
It gives result: {[a;b;c]a+b*c}[1;2;3]
I still think that their implicit parameters are keywords. Similarly as keyword 'it' in Kotlin programming language is used to refer to the single parameter of the lambda expression. function A1(x, y) {return x*y + x; }
But A2 would be: function A2(y, x) {return y*x + y; }
If you do not like the default order of implicit parameters, you can always use Grace~ operator to move x or y. Prefix form moves the parameter one position towards the beginning of the parameters list, postfix form moves one position towards the end of the parameters list: A1 = y~ * x + y
or A1 = y * ~x + y
or
[Edit] A1 = y * x + y~
In the last example take into consideration, that without Grace~ operator y is the first parameter, so, you need to move it one position towards the end of the parameters list - therefore use postfix form of Grace~ operator. function(x) {return x; }
In KatLang You can define it as: x
The question is: can you remove one more symbol without changing the meaning of the expression? If no, then, the identity function definition 'x' is symbols perfect according to my definition. Of course, I rely on the usage context and it allows me to hide some part of critical information and focus only on the short lambda expression. A1 = x * y + x
A2 = y * x + x
A1(1, 2), A2(1, 2)
returns results 3, 4
If You want to change parameter order, You can use Grace~ operator like this: A1 = x~ * y + x
it moves parameter x one position towards the end of the parameters list.
It results in
It seems like you can define variables with the name 'x', but when you do not have explicit parameters, then the identifier 'x' is used to refer to the first implicit parameter, y - for second and z - for the third parameter. In context of implicit parameters x, y and z acts like predefined keywords.