News for hackers. Stuff that matters.
Re:Show HN: KatLang – Language for Calculations by rabarbers on Thursday December 02, 2021 @12:26PM (#29419264)
A1 in Javascript pseudocode would be:

  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.

There are no comments on this comment yet.