If none of your arguments is a verb, you are not writing an adverb, so why
not with something simple like:

   notadv=: 3 : 'a*b-c [ ''a b c''=. y'
   notadv 3 10 5
15

?

On Tue, Dec 14, 2010 at 7:03 PM, Graham Parkhouse <
graham.parkho...@ntlworld.com> wrote:

> How can I write an adverb that returns a noun from 3 noun arguments x, m
> and
> y as a *one liner*?
>
> Just 2 arguments is fine:
>   adv1=: 1 : 'm*y'
>   3 adv1 10
> 30
>
> 3 arguments like this doesn't work:
>   adv2=: 1 : 'm*y-x'
>   5 (3) adv2 10
> |domain error
> |   5    (3)adv2 10
>
> Giving it a body works:
>   adv3=: 1 : 0
> :
> m*y-x
> )
>   5 (3) adv3 10
> 15
>
> Is there a way to do it as one liner?
>
> Regards
>
> Graham Parkhouse
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to