> Date: Wed, 01 Feb 2012 16:47:01 +0100 > From: Aai <[email protected]> > Subject: Re: [Jprogramming] Understanding C. , A. > To: Programming forum <[email protected]> > Message-ID: <[email protected]>
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
