Assuming the user function:
∇ f b  b ∇
and the following is executed:
f¨1 2 3
Three lines will display, 1 digit per line. In APLX the order is 1 2 3. Is there any APL2 guarantee the order the digits will be displayed?
This can be critical if the user function has side-effects. I'd think this would be documented somewhere, but heck if I can find it.
The APL Language Reference says:
⁝ Z←0ρV L1:→(0=ρV)/L1X Z←Z,⊂F↑V V←1↓V →L1 L1X: ⁝
The above loop can be replaced by:
This clearly implies that
¨ runs in reliable order.
Furthermore, the ISO/IEC 13751 (2001) Programming language Extended APL, which is based on APL2, says:
Z, an array having the same shape-list as
Iin the index-set of the ravel-list of
For form f¨
Iof the ravel-list of
Evaluate-Monadic-Function with f
Xgiving token T.
This clearly specifies that the operand is to be applied in sequence, its evaluation needing completion before proceding to the next item in the ravel order.