gjohnson@cornell.UUCP (05/01/84)
Has anyone proposed allowing functions to be viewed as data items in APL? What I have in mind is the ability to construct arrays of functions. One could then have a dyadic operation 'apply' which takes an array of functions as one argument and an array of arguments as the other argument and applies each function to the corresponding element of the argument array. Or perhaps one might want to add an application operator to the language. Then one could have arrays of dyadic functions. We could then do something like this: funcs := + - ^ arg1 := 3 4 1 arg2 := 7 1 1 arg1 funcs <apply operator> arg2 10 3 1 It might be interesting to extend the scalar types to include functions (in addition to numbers and characters), add an application function to the set of APL primitives, and devise whatever operators seem appropriate. - Greg Johnson ...!cornell!gjohnson