On Jan 6, 2008 2:46 AM, neville holmes <[EMAIL PROTECTED]> wrote:
> But for dyadic functions I would like z =. [ , ] ,: [.
> which would stack both arguments over their dyadic result,
> like a ^ z b would stack a over b over a^b.

Not that this uses the mechanism you advocate, but:
   adv1=: (]`[`)(`:0)
   1 2 3 +adv1 4 5 6
4 5 6
1 2 3
5 7 9

J's mechanisms for defining tacit adverbs, while not
totally general, do seem useful for most simple cases.

But what's not clear, to me, is what benefits your
proposed mechanism has.  I mean, other than
being different from 1 :'' and 2 :'' forms in that you
do not have the quotes and stuff.  (The requirement
that the mechanism not use quotes seems totally
arbitrary, to me, so I am looking for some other
reason for this approach).

Hypothetically speaking, you could change J's
session manager so that if it sees [. or ]. on a
line, it will find the rightmost copula on that
line, and replace whatever follows with an
appropriate 1 :'' or 2 :'' expression, as appropriate.
For extra credit, you could do the reverse when
displaying lines.

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

Reply via email to