More on APL 2.5
Vector 11:4, page 120
Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 120
I was thrilled to see your review of IBM’s APL2.5 in April’s Vector 6-4, and felt moved to send you a further couple of examples. One consequence of the direct definition of operators which may not be immediately obvious, is the ease with which you can define the inverse operator for monadic functions:
INV produces a derived function which reverses the effect of its operand:
for any array A and any monadic function F. The following examples show the power of this operator.
In the case where the inverse is not simple, the system provides a ‘least squares’ solution:
and of course, INV may take a system function as its operand, so:
… re-instates a previously expunged function, and:
… produces the same effect as ⎕DL ¯2 in Dyalog APL.
We are only now beginning to appreciate the power of this new implementation, but I’m sure that such examples will soon swell our idiom libraries.