No, Geoff, the ~. applies before the rightmost /
Yet again, I suggest you look at the boxed or parenthesised
displays to see that

   ~.@,@:(+/)/

is broken down as

  (   (~.@,)     (@:)     (+/)   )      /

so that Raul's (?) verb does use the nub for each intermediate sum.

Does that help?

Mike

Geoff Canyon wrote:
I was referring to this:

  ~.@,@:(+/)/ c

which (as far as I can see) doesn't -- yet still seems to function for large arrays...

On Feb 6, 2008, at 4:27 AM, Raul Miller wrote:

On Feb 6, 2008 2:31 AM, Geoff Canyon <[EMAIL PROTECTED]> wrote:
Raul's solution doesn't seem to be doing intermediate nubs, and it
still works in about the same time and space, so I don't know what's
going on there.

Actually, my solution does the intermediate nubs, which are all
that's necessary.

  f=:([: ~. [: , +/)/
  f i.3 5
15 16 17 18 19 20 21 22 23 24 25 26 27

--
Raul
----------------------------------------------------------------------
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