or even this?

  i: 5  NB. newish primitive monad
_5 _4 _3 _2 _1 0 1 2 3 4 5

Mike


Raul Miller wrote:
On 7/12/07, Devon McCormick <[EMAIL PROTECTED]> wrote:
One thing that makes the exhaustive solution difficult, if not impossible, is that the numbers may be negative (as in John Randall's example solution).

You can use a sequence generated by something like
  (<[EMAIL PROTECTED]: * _1 ^ 2&|)@>:@i.
instead of just plain i. to deal with that issue.

  (<[EMAIL PROTECTED]: * _1 ^ 2&|)@>:@i. 10
0 1 _1 2 _2 3 _3 4 _4 5

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

Reply via email to