On Fri, Apr 4, 2008 at 12:05 PM, Dan Bron <[EMAIL PROTECTED]> wrote: > It's a monad whose input is a scalar integer. What is its output? What does > the verb do?
It rather inefficiently finds prime numbers in the sequence up through 1 plus its right argument. The overall structure of your verb is ()@:(). The right parenthesis constructs the sequence 2..n+1 The left parenthesis first computes a multiplication table based on that sequence, then ravels it, and then finds which members of that original sequence did not appear in that multiplication table. Finally, you select elements from that original sequence which did not appear. I think that i.&.(p:inv)@+&2 would perform this same operation more efficiently. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
