This has tripped me up too.  It's helpful to remember that including "x"
means you're defining a dyadic "verb", e.g. for the ambivalent case:
adv=: 1 : 0
   u/\y
:
   x u/\y
)

   2 + adv i. 5
1 3 5 7
   + adv i. 5
0 1 3 6 10



On Tue, Jul 31, 2018 at 8:44 PM Henry Rich <[email protected]> wrote:

> The dyadic case of a modifier must follow a colon separator:
>
> adv =. 1 : 0
> :
> x u/\ y
> )
>
> As Pascal mentioned earlier, it is MUCH better to write
>
> adv =: 1 : 'u/\'
>
> The NuVoc pages for (:) talk about this stuff.
>
> Henry Rich
>
> On 7/31/2018 8:12 PM, Piet Google wrote:
> > Since
> >
> >      2 +/\ i.5
> > 1 3 5 7
> >
> > Further
> >
> >      ad=.1 : 'u/\'
> >      2 + ad i.5
> > 1 3 5 7
> >
> > However
> >
> >      adv=.1 : 'x u/\ y'
> >      2 + adv i.5
> > |domain error
> >
> > Why?  I suspect it is something to do with bracketing and/or ‘x’ being
> passed to u.
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> ---
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 

Devon McCormick, CFA

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

Reply via email to