Ah, I see that's a bit like yours David.

Modifying it for 1< #x

    3 6 (C. |.~ -@#@[) 'abc*ef*g'
**abcefg


(from Essays)

    3 6 (C.&.|.~ <:@-)~ 'abc*ef*g'
**abcefg




On 01-02-12 16:47, Aai wrote:
> Sorry for the noise. You should forget the previous ones I sent: they 
> are wrong.
>
> It looks like this one is ok:
>
> mtf=:_1&|.@C.
>
>    ]samples=: '*abcef' |."0 1 ~-i.6
> *abcef
> f*abce
> ef*abc
> cef*ab
> bcef*a
> abcef*
>
>
>    ]res=: '*' ([,-.~) "1 samples
> *abcef
> *fabce
> *efabc
> *cefab
> *bcefa
> *abcef
>
>    res -: mtf&>/"1 (;~I.@:('*'&=))"1 samples
> 1
>
>
>
>

-- 
Met vriendelijke groet,
@@i = Arie Groeneveld

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

Reply via email to