> From: Brian Schott
>
> Yes, and I made a couple of small changes to the dyadic gerund form.
>
> ccog (1&{"1@],.(({:"1@])`([: <"1 i.@#@] ,. {."1@])`(_ $~ $@])) }) R
>
Another approach ...
(<"0@(1&{"1) ,. -@:{."1 |."0 1 a: ,.~^:2 [: <"0 {:"1) R