A bit more general, moving item x0 to place x1, and using A. : 3 7 (+/@:!@([+ i.@-~)/@[ A. i.@])10 0 1 2 4 5 6 7 3 8 9
R.E. Boss > -----Oorspronkelijk bericht----- > Van: [email protected] [mailto:programming- > [email protected]] Namens Ian Clark > Verzonden: vrijdag 29 april 2011 16:19 > Aan: Programming forum > Onderwerp: Re: [Jprogramming] A permutation of i.y > > Thanks Raul. It is. > > Just remains to do timings to find the quickest in-context. > > > On Fri, Apr 29, 2011 at 3:05 PM, Raul Miller <[email protected]> wrote: > > This might be what you want: > > > > foo=: (C.~ <)&i.~ > > > > 3 (C.~ <)&i.~ 9 > > 1 2 0 3 4 5 6 7 8 > > > > -- > > 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 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
