@RGS OK, then. The f←{…} syntax allows multiple statements. You can separate them with ⋄ or you can write multiple lines. For that, you want to use the built-in editor. Simply enter )ed myFun
Then you can amend that to say e.g.
myFun←{
b←⍵+3
2×b
}
Then press Escape to close and save that (temporarily — it will disappear if you quit APL).
@Adám - In Dyalog for Windows x64, is there some easy way in the )EDitor that I can do a global search-and-replace to change lowercase letters to uppercase?
@Adám - Essentially universal - that is, for historical reasons, I don't want any lowercase letters in the workspace. I'm good with changing things one function at a time.
So you now know basically all there is to know about APL functions (it is really that simple!). However, APL also has higher-order functions, we call them operators, that can derive members of a family of functions. E.g. you know about +. The / operator takes plus and derives "sum":
@RGS E.g. the ∘ operator can take two functions f∘g and derive a new function. So you can write f∘g(x) just like in TMN, only f∘g x is of course enough.
As I mentioned before, ∘ can also derive a single-argument function from a two-argument function by currying one argument, as in incr←1∘+ or decr←-∘1
So APL has this principle of generalising TMN concepts and notations. Dot product in APL is +.× where . is a two-operand (we call it dyadic) operator. You can substitute any two functions for + and ×.