[Jprogramming] Creating adverb

Arnab Chakraborty arnabc74 at gmail.com
Sat Aug 24 16:19:11 UTC 2019


Thanks a lot. It was kind of hard to guess that. But now it's clear.

On Sat, 24 Aug 2019, 20:41 bill lam, <bbill.lam at gmail.com> wrote:

> Just as what Henry said, u must be there for x y to have usual meaning. u
> can do nothing. try
>
> f =: adverb define
>  u
>    y
> :
>  u
>   x
> )
>
> On Sat, Aug 24, 2019, 10:07 PM Arnab Chakraborty <damdemi at gmail.com>
> wrote:
>
> > Hi,
> >
> > I cannot understand the behavior of the following code that I have
> written:
> >
> > f =: adverb define
> >    y
> > :
> >   x
> > )
> >
> > I expected this adverb to convert any verb to one that as a monad is same
> > as identity function, and as a dyad is just [
> >
> > It produces syntax error when called like
> >
> > (sin f) 1
> >
> > or
> >
> > 2 (+ f) 3
> >
> > But the following adverb works fine:
> >
> > f =: adverb define
> >   (u y)
> > :
> >   x
> > )
> >
> > I cannot understand this behavior.
> >
> > Any idea?
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


More information about the Programming mailing list