What is the syntax for a vector (array) of functions in APL?
I have tried the following but these are interpreted as a 3-train and a 2-train, respectively:
{1},{2}
{1} {2}
PS. I am looking to do this with more complex (and possibly named) functions by the way, the {1} above is just so the example is short.
>Solution :
Dyalog APL does not officially support function arrays, you can awkwardly emulate them by creating an array of namespaces with identically named functions.
(a←⎕NS⍬).f←2∘×
(b←⎕NS⍬).f←÷∘2
(c←⎕NS⍬).f←-
f←(a b c).f
f 4
8 2 ¯4
Maria Wells suggested an operator to produce an array of functions