Right. When it is an integer, it is a very simple operator. (f⍣k)Y is simply f f f … f f Y
And the dyadic form uses the left argument unchanged every time: X(f⍣k)Y is simply X f X f X f … X f X f Y
The only thing to look out for is that the count (k) must be separated from the argument, either by naming, or with parenthesis, or by a monadic function (often ⊢).
@JamesHeslip Sure, but here you're using a scalar function, but remember that × could be anything. You're passing it an enclosed vector instead of a vector.
However, later with list,∘⊂← we only use the enclose as part of the amendment of list. The pass-through of an assignment is always whatever is on the right of ←.
That's why we don't need to disclose.
We could of course have written ⊃list,←⊂ too.
So, the operator we're writing…
The first thing is ⍺←⊢. Is everyone familiar with this notation?
So this is a convenient way to write ambivalent functions.
@SamThompson This is a neat function. You could call it "vector", as it always returns a vector (for scalar and vector arguments).
So, the inner function is simply the expression we came up with before: {r,∘⊂←⍺ ⍺⍺ ⍵}⍣⍵⍵
However, since the function we're actually applying doesn't have a name, we have to pass it in as ⍺⍺, so the operand to ⍣ is actually another operator.
That's why it has ⍺⍺ of the outer operator on its left, to pass in the function: