Thanks David,

That's certainly one to put in my toolbox. So nice (and common) I'd almost
expect it in the standard library.
Learned something new today :)

Best regards,
Jan-Pieter

On Thu, 16 Feb 2023, 18:28 David Lambert, <b49p23t...@gmail.com> wrote:

> Of the new modifier trains, I've found ^:^:_ as "while".  A simple test
> code: increment while less than 8.  (With some errors one need kill the
> j session.)
>
>     >: (^:^:_) (<&8) 2
>
> 8
>
>     While=: ^:^:_
>
>     u. While v.
> u.^:v.^:_
>
> > Date: Wed, 15 Feb 2023 13:12:37 +0100
> > From: Jan-Pieter Jacobs<janpieter.jac...@gmail.com>
> > To:programm...@jsoftware.com
> > Subject: Re: [Jprogramming] Atop parsing
> > Message-ID:
> >       <
> cans99cyu9dmv0kgq+sh4dtvxiueqvcoz_if5iwzw_cvuhh4...@mail.gmail.com>
> > Content-Type: text/plain; charset="UTF-8"
> >
> > The reason it's hard to find anything else on modifier trains is that
> they
> > have been removed from the language a long time ago (with j501 in 2002,
> > apparently), and only reintroduced recently with j903.
> >
> > Before the reintroduction, the only modifier trains were bidents:
> > - partially applied conjunctions, yielding adverbs; and
> > - chained adverbs, being applied to their left argument in order.
> > They were left over because they are simple, intuitive and easy to
> remember
> > (guessing here, as I wasn't around in the J scene yet).
> > These are explained well inhttps://
> www.jsoftware.com/help/learning/15.htm  .
> > The adverbs each and every defined in the standard library library are
> > useful examples of the first kind of bidents:
> >     type&.<'each'
> > adverb
> >     each
> > &.>
> >
> > The rabbit hole of general modifier trains is deep: they are not
> completely
> > intuitive (at least to me) and require a thorough understanding of the
> > parsing and execution in J, especially when chaining more than three.
> They
> > are also not indispensable, as you can write explicit conjunctions and
> > adverbs to do anything such tacit modifiers would do. I have yet to find
> a
> > useful, non-trivial purpose for them... Of course, feel free to use them
> if
> > you like the challenge, but there are far more important areas to get to
> > know in J, like rank. Or all the wonderful labs (in the menu, help >
> studio
> >> labs).
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to