bp=. (, :-.)@(,: ] C.~ 1 <@|. i.@# }.~ 0 i.~])
uc ([:(' ' e.~ {.)`]} ] ({:@] #^:_1 (#~{.))"1 2 bp@e.~) 'abcDEfghI'
abDEcfgIh
uc ([:(' ' e.~ {.)`]} ] ({:@] #^:_1 (#~{.))"1 2 bp@e.~) 'AbC'
ACb
uc ([:(' ' e.~ {.)`]} ] ({:@] #^:_1 (#~{.))"1 2 bp@e.~) 'XYZ'
XYZ
R.E. Boss
> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:programming-
> [email protected]] Namens R.E. Boss
> Verzonden: vrijdag 12 augustus 2011 10:48
> Aan: 'Programming forum'
> Onderwerp: [Jprogramming] shift Certain elements (was RE: Materials for
> NYCJUG meeting today - Tuesday 8/9 at Empire State Building)
>
>
> 'lc uc' =. +&(i.26)&.(a.&i.)"0 'aA'
> t=: ((lc,uc)&i.) :. ({&(lc,uc))
>
> (({.@],[,}.@])`,@.((26>[)+.25<{.@]))/&.|.&.t 'abcDEfghI'
> abDEcfgIh
>
> (({.@],[,}.@])`,@.((26>[)+.25<{.@]))/&.|.&.t 'AbC'
> ACb
>
> (({.@],[,}.@])`,@.((26>[)+.25<{.@]))/&.|.&.t 'XYZ'
> XYZ
>
>
> R.E. Boss
>
>
> > -----Oorspronkelijk bericht-----
> > Van: [email protected] [mailto:programming-
> > [email protected]] Namens Henry Rich
> > Verzonden: dinsdag 9 augustus 2011 22:46
> > Aan: Programming forum
> > Onderwerp: Re: [Jprogramming] Materials for NYCJUG meeting today -
> > Tuesday 8/9 at Empire State Building
> >
> > I said not to try to shift the first element! That requires a design
> decision. If
> > you want to ignore leading shift requests, it's easy enough:
> >
> > shift =. 1 : '{~ (;@(<@(1&|.);.1) i.@#)@:(= *./\)@:u'
> >
> > 'lc uc' =. +&(i.26)&.(a.&i.)"0 'aA'
> > p =. e.&uc
> >
> > p shift 'abcDEfghI'
> > abDEcfgIh
> > p shift 'AbC'
> > ACb
> > p shift 'XYZ'
> > XYZ
> >
> > Henry Rich
> >
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm