On 8/24/07, John Randall <[EMAIL PROTECTED]> wrote:
>   f=:[: +/ 5 = [: , [: q: [: >: i.

Or:
   F=: [: +/ 3 {:@q: 1 + i.

Though, of course,  the other style is radically more efficient:
   G=: [: +/ ] <[EMAIL PROTECTED] >:@i.@<.&.(5&^.)
   G 5e9
1249999998

That said, there's something inconsistent here:
   G"0 1+i.10
|domain error: G
|       G"0 1+i.10
   G"0(1 2 3 4 5 6 7 8 9 10)
0 0 0 0 1 1 1 1 1 2

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

Reply via email to