I'm still uncertain what to do about this. One reason is that the two-variable case is much more common than all the rest put together. So if I could think of a very clean way to represent a fn of two vars, that might be better.
I was thinking that _ would be merely _0, ie _1 would be the second argument. But at this point that's not really the question, the question is how will the interpreter know how many arguments the function takes?
Maybe something like:
[[[+ _ _1 _2]]]
Could be shorthand for:
(fn (_ _1 _2) (+ _ _1 _2))
But, then, what if you want to use square bracket notation inside of that? For example, what if you want to create a two paramater function that creates a one paramater function?
(fn (x y) [+ x y _])
would be impossible. Unless you use currying or something on these special ones. Incidentally, a curry function:
... the interpreter already knows that _2 is the second anonymous parameter to the function literal, without parsing the "2" token.
So you could instead have:
[+ _ _ _]
... and specify the index only if you actually want to use the parameter outside of the function literal (and there, _ would still be shorthand for _1).
And BTW, this whole thing should work with rest parameters, so that in:
I'm just saying that if you have several anonymous parameters in the parameter list of the function literal, it is just as well that you represent them with the same token _within the parameter list_. The parameter list is ordered, so the interpreter knows which is which anyway. If you then want to refer to one of the anonymous parameters _outside of the parameter list_, you use a token WITH an index, to identify the position of the particular anonymous parameter in the parameter list.