> nplt plt k is k

No,  nplt plt k  is  i.#plt k , or  nplt p: k  is  k .



----- Original Message -----
From: Roger Hui <[EMAIL PROTECTED]>
Date: Saturday, April 5, 2008 8:13
Subject: Re: [Jgeneral] How readable is J?
To: General forum <[email protected]>

> That is actually the way I had it at one point.
> I debated back and forth whether to use nplt instead
> of [EMAIL PROTECTED], the latter exploiting the fact that nplt plt k
> is k, and esp. whether to include "the fact" as
> a note in the essay.
> 
> 
> 
> ----- Original Message -----
> From: John Randall <[EMAIL PROTECTED]>
> Date: Saturday, April 5, 2008 7:06
> Subject: Re: [Jgeneral] How readable is J?
> To: General forum <[email protected]>
> 
> > Roger Hui wrote:
> > > The J solution can be shortened by removing the >. .  Thus:
> > >
> > > nplt=: p:^:_1        NB. 
> > #primes <  n
> > > plt =: i.&.(p:^:_1)  NB.  primes <  n
> > > nsp =: 3 : '+/ (nplt@(y&%) - [EMAIL PROTECTED]) plt %:y' " 0
> > >
> > 
> > Here is a variant which is less efficient, but possibly more 
> readable.> 
> > nsp3 =: 3 : '+/(nplt@(y&%)-nplt) plt %:y' " 0
> > 
> > Note that the [EMAIL PROTECTED] in Roger's solution could be computed 
> > separately. I
> > use a more complicated calculation which expresses its role.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to