On 4/4/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
< quote href =
http://www.jsoftware.com/help/jforc/loopless_code_i_verbs_have_r.htm#_Toc141157987
>
consider the new verb monad +/, which creates the total of the items
of its operand (just think of it as 'monad SumItems'):
+/ 1 2 3
6
The result was 1 + 2 + 3, as expected.
</ quote>
To be honest, it would be nice if this result were fleshed out because
all the prior examples in this section were based on operands of
rank-2.
I would describe +/ used with only a left argument as a verb which has
the same result as that of an expression where the verb + is inserted
between each of the items of the argument array of the +/ verb.
In other words:
+/1 2 3
gives the same result as
1+2+3
Also,
+/i.3 2
gives the same result as
0 1+2 3+4 5
Does this help?
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm