On Tue, Aug 27, 2019 at 10:47 PM 'Pascal Jasmin' via Beta
<[email protected]> wrote:
> I think all references for Z: should refer to u verb?  Would Z: ever be 
> called in v verb?  _1&Z: makes no sense.
> As a simple example, find first prime whose next prime is greater than 5 
> higher?
>
>    [`(_2 Z: 1:)@.(5 < -) F.. ] p: i.20
> 23

Is this equivalence worth noting?

   ([ [ _2 Z: 5 < -) F.. ] p: i.20
23

The right argument to Z: is a on/off control value -- 0 means Z: does
nothing that time.

With this fold implementation, I anticipate seeing constructs like:
   f [ opcode Z: test

> How might you get the first prime whose previous neighbour is less than 5 
> higher? (29)

Presumably, you were hinting at a variation on this:

   ([ [ 1 Z: 5 < -) F.. ] p: i.20
29

Thanks,

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

Reply via email to