verbs cannot return verbs.
adverbs and conjunctions can.

(7&+) is a function (verb).  It is the same as the
add7 verb in Chris's example solution.  if n is the
number in the graham challenge, then (n&+) is a fine
solution.

(&+) is an adverb. Adverbs take argument on left.
7 (&+) "evaluates" to the verb (7&+).
 (7&+) 100
107
 7 (&+) 100 
107 
IMO, the better accgen challenge submission for J is, 
n (&+)  --> n (&+) i 
or if you had to:
foo =: 1 : 'm (&+)'

The general solution to creating a function returning
a function is to define an adverb or conjunction to do
it.

--- Vladimir Lazunin <[EMAIL PROTECTED]>
wrote:

> Is it possible to make that in J?
> http://www.paulgraham.com/accgen.html
>
----------------------------------------------------------------------
> For information about J forums see
> http://www.jsoftware.com/forums.htm
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to