Most primitive APL functions have both a monadic (one argument) and a dyadic (two arguments) form. It is always clear from context which one is being applied, as all monadic functions are prefix, and all dyadic ones are infix.
So, we already addressed the dyadic ⍴ which was "reshape". The monadic ⍴ is "shape". So it reports back what the shape is.
@JohnDvorak "Mix", because it mixes elements together to form higher rank arrays. As opposed to "Split", ↓, which splits high-rank arrays into lists of lesser-rank arrays.
Monadic ⍴ always returns a vector. Monadic ≢ always returns a scalar. ≢ on a matrix returns the number of rows. ≢ on a 3D block returns the number of layers, etc.
We already saw how dyadic ⍴ can reshape things. Dyadic ↑ is take. In order to speak about its two arguments easier, we will give them names. The left argument we will call ⍺ as in the leftmost letter of the Greek alphabet, and the right argument we will call ⍵ as in the rightmost letter.
So ↑⍵ is monadic ↑ and ⍺↑⍵ is dyadic.↑.
⍺↑⍵ takes the ⍺ first major cells (!) from ⍵. E.g. 3↑3 1 4 1 5 is 3 1 4.
CMC: Any guesses (those that don't know) as to how we take from the back instead?
Definition and Rules
A golfy array is an array of integers, where each element is higher than or equal to the arithmetic mean of all the previous elements. Your task is to determine whether an array of positive integers given as input is golfy or not.
You do not need to handle the empty list.
...
@J.Salle If you want Dyalog APL for 2 OSs, then apply for two licences. I actually don't know if Karen will give you two serial numbers, but it doesn't matter what you enter into the serial number field upon install :-)
@EriktheOutgolfer It is a 5 "car" train. One "car" is not a function, but it is still a train because there is no data on the right.
I think we should continue with a few more array-manipulation primitives before we try tackling Uriel's solution.
The remaining array manipulation primitives are really simple. Monadic ∊enlists an array. It takes all the data, on all levels of depth and rank and creates a simple vector of depth 1.
It works for any-rank arrays, but they have to conform. You can even concatenate a vector to a matrix, and that will concatenate one element from the vector to each row of the matrix.
@EriktheOutgolfer pair? (and no, ; is special syntax in APL, not a function)
@Adám Btw, why is the code in the input field on TIO? Is there a distinction between snippets and full programs and only the later work in the code field?
@Laikoni The main reason for using Input now is that expressions in INput have implicit output. Expressions in Code would require me to include the printing code.