On Sat, 2011-04-02 at 12:15 -0400, Marshall Lochbaum wrote:
> Verbs can't return verbs (sad but true). You want the adverb 

Yes, quite, and you have no idea what this does to my neatly ordered
views on functional compositionality!    :(

To clarify for Bob Therriault and anyone else, what I wanted was a
monadic "part of speech" that will generate the verb "mypoly"

So far, on Marshal's advice I have the quite acceptable:
makepoly =: &p.
mypoly =. 1 2 3 makepoly  NB.  Just like a verb but arguments reversed
mypoly 4
   57      NB. Success

Thanks Marshall -- so I suppose you can't "reverse" the arguments for an
adverb, since this would break down the linguistic metaphor, although
I'm not quite sure how well it holds here.  After all, it looks like I'm
combining a noun (1 2 3) with an adverb (&p.) to make a verb!

Anyway it works acceptably for my purposes, so all's well again...
As Bob said, you've got to review some assumptions.  Hm...





----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to