3 foo 9 3 1 2 0 4 5 6 7 8 Should be: 1 2 3 0 4 5 6 7 8
C. now... that's getting warm. On Fri, Apr 29, 2011 at 1:07 PM, Dan Bron <[email protected]> wrote: > foo =: <@(0,[) C. i.@] > > (Untested) > > -Dan > > > > Please excuse typos; composed on a handheld device. > > -----Original Message----- > From: Ian Clark <[email protected]> > Sender: [email protected] > Date: Fri, 29 Apr 2011 13:03:55 > To: Programming forum<[email protected]> > Reply-To: Programming forum <[email protected]> > Subject: [Jprogramming] A permutation of i.y > > My brain's a mess this morning... > > Let foo be a dyadic verb which simply returns i.y with the zero > floated up to position x . > (Forget the cases of x<1 and x>y) > > foo=: 4 : '(1|.i.x) , (x}.i.y)' > 3 foo 9 > 1 2 0 3 4 5 6 7 8 > > That's a distressing way of doing it, but it's the best I can manage. > There's got to be a neater solution. Using # maybe? > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
