Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site cornell.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!hogpc!houti!ariel!vax135!cornell!gjohnson From: gjohnson@cornell.UUCP Newsgroups: net.lang.apl Subject: add functions to the list of scalar types? Message-ID: <7902@cornell.UUCP> Date: Mon, 30-Apr-84 21:51:38 EDT Article-I.D.: cornell.7902 Posted: Mon Apr 30 21:51:38 1984 Date-Received: Tue, 1-May-84 19:35:25 EDT Organization: Cornell Univ. CS Dept. Lines: 22 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 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