Pascal,

I think your <: is too limiting. But I love your approach.

fn =: <@|.@[ (|.each@:|.@:($~ each 1 >.   <:)  4 : 'x/ y' every  <\.@]) ]
fn =: <@|.@[ (|.each@:|.@:($~ each 1 >. i.@#)  4 : 'x/ y' every  <\.@]) ]

On Tue, Feb 23, 2016 at 10:51 PM, Pascal Jasmin <[email protected]>
wrote:

> fn =: <@|.@[ (|.each@:|.@:($~ each 1 >. <:)  4 : 'x/ y' every  <\.@]) ]
>
>
>  %`- fn 1 2 3 4 5 6 7
> 0.6 1.66667 0.333333 9 _5 _1 7
>
>
>  *`+ fn 1 2 3 4 5 6 7
> 209 209 207 69 65 13 7
>
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to