I've never seen !. on anything larger than a primitive... does the interpreter let you do that?
Sort of an example: 2&|.!.0 i. 10 |domain error | 2&|.!.0 i.10 2&(|.!.0) i. 10 2 3 4 5 6 7 8 9 0 0 Still a great idea. Marshall -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Raul Miller Sent: Sunday, September 05, 2010 7:41 PM To: Programming forum Subject: Re: [Jprogramming] Mask from list of indices with multiplicity On Sun, Sep 5, 2010 at 6:19 PM, Marshall Lochbaum <[email protected]> wrote: > I do really like the idea of this being I.^:_1. A lot of times I have > had an array of indices that I would like to get to an array of 1s, > and I have been forced to use something like (i.n) e. l (list is l, max index is n). > Making I.^:_1 equal to ([: <:@(#/.~) i.@>:@(>./) , ]) would be really > useful. And perhaps !. could be used to specify the maximum index if <./ gets that wrong? -- 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
