> Write a function that, given a right argument Y which is a scalar or a non-empty vector and a left argument X which is a single non-zero integer so that its absolute value is less or equal to ≢Y, splits Y into a vector of two vectors according to X, as follows:
> ⠀• If X>0, the first vector contains the first X elements of Y and the second vector contains the remaining elements.
> ⠀• If X<0, the second vector contains the last |X elements of Y and the first vector contains the remaining elements.
@Richard Right, that's a principle of explicit-to-tacit conversion: The process cannot translate an expression that contains ⍺ or ⍵ free in the operand of an operator.
No, ⍣ doesn't pass the outer arguments to the operand.
If you give it a function operand, it'll do fix-point instead.
@Richard However, since we only have two elements, note that a 1-step rotation is the same as a reversal, so you can use dyadic ⌽ where the left argument is a function of the outer left argument.
I may just be bad at searching but aplcart might benefit from a {take, drop} while element satisfies predicate operator
I have a simple implementation that is probably not good enough - it would work if dyalog was a lazy language, (1=2÷)op 2 2 2 1 0 shouldn't fail - and a way too overcomplicated correct solution, I'm sure there is an elegant correct sol which I can't write