I've done: verb&,\

I arranged the list to be of shape 'x 4'. This seems to work. The problem I'm 
now having is that my verb is slow. Can this be refined (significantly)?

+/@:(1&p:) % 1&+@:#

It takes finds the percentage of items in the list which are prime.

On 25 Sep 2011, at 20:04, Don Guinn wrote:

>   verb=.<
>   (verb&,)\_4,\3 5 7 9 13 17 21 25 31 37 43 49
> +-------+-------------------+-------------------------------+
> |3 5 7 9|3 5 7 9 13 17 21 25|3 5 7 9 13 17 21 25 31 37 43 49|
> +-------+-------------------+-------------------------------+
> 
> 
> On Sun, Sep 25, 2011 at 12:44 PM, David Vaughan <
> [email protected]> wrote:
> 
>> I'm trying to apply a verb to infixes of length 4 but I want it to be
>> cumulative. i.e. in the list:
>> 
>> 3 5 7 9 13 17 21 25 31 37 43 49
>> 
>> I want:
>> 
>> verb 3 5 7 9
>> verb 3 5 7 9 13 17 21 25
>> verb 3 5 7 9 13 17 21 25 31 37 43 49
>> 
>> Any help? Thanks.
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
> ----------------------------------------------------------------------
> 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