On 7/1/07, Glenn M. Lewis <[EMAIL PROTECTED]> wrote:
But the expression (i.>./s) seems to generate the empty list, and i
turns out to be zero.

I think you're talking about (i. >./)@:(+/)

Here, (i. >./) is a hook.  This hook means: find the index of the
largest atom (it only works that way on rank 1 arrays, but since
(i. >./)@:(+/) is used as a monad on a rank 2 array, the +/ ensures
that you are indeed working with a rank 1 array.

For example (i. >./) 0 0 1 0 0 is equivalent to 0 0 1 0 0 i. >./ 0 0 1 0 0
which is equivalent to 0 0 1 0 0 i. 1 which, in turn, produces the
number 2.

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

Reply via email to