> Date: Wed, 01 Feb 2012 16:47:01 +0100
> From: Aai <agroeneveld...@gmail.com>
> Subject: Re: [Jprogramming] Understanding C. , A.
> To: Programming forum <programming@jsoftware.com>
> Message-ID: <4f295e75.6030...@gmail.com> 

Having discovered that I had carelessly tested with the middle index of
an odd-length list, I arrived at the repaired definition which I
installed into the under essay
http://www.jsoftware.com/jwiki/Essays/Under

mtfdwl=: (C.&.|.~ <:@:-)~

It works as I'd expect for positive and negative x .  If wrong please
let me know or remove from essay.  My version with under passes your
test.

   samples=: '*abcef' |."0 1 ~-i.6
   res=: '*' ([,-.~) "1 samples
   mtfdwl=:(C.&.|.~ <:@:-)~
   mtfaai=:_1&|.@C.
   res -: mtfdwl&>/"1 (;~I.@:('*'&=))"1 samples
   res -: mtfaai&>/"1 (;~I.@:('*'&=))"1 samples

PS.  Thank you for the solution with A. !

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

Reply via email to