I might not have understood the problem completely but:

   foo =: 2 : 0
        ". m, ' =: ', (": n) , ' + ]'
)

   'bar' foo 10 NB. this line executes to create a function bar

   bar
10 + ]
   bar i. 10 NB. the function bar which was created ads 10 to its input
10 11 12 13 14 15 16 17 18 19


More generally:

   NB. If you are prepared to enter tacit J as input to function
(conjunction) then:
   foo2 =: 2 : 0
        ". m, ' =: ', n
)

   'bar2' foo2 '10*]'  NB. creates verb bar2 based on input text

   bar2
10 * ]
   bar2 i. 10   NB. bar2 multiplies by 10
0 10 20 30 40 50 60 70 80 90


I think that foo2 does the following: "I want to create a verb
"defverb" such that 'myname' defverb '<my sentence>' assigns <my
sentence> to a new verb 'myname' "
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to