Bob and Ric,

Focusing separately on the 3 parts of the gerund form by placing ; between
the parts, really helps me see what you have done. (And btw, i should have
contained 'STU' also. Thanks, again.
Bob's version and Ric's version both produce virtually identical results; I
prefixed Bob's version with ,. to avoid line wrap here.

    ,.(<"0 ind)  ((>@{.@]) ; [;(>@{:@]))each <cmb

    ((0 1,:1 2) {~ permrep 2) ((0&{::@]) ;(<@:(<"1)@[);(1&{::@]) )"2 _ w;i
┌────────────────────┐
│┌──┬───────────┬───┐│
││ab│┌─────────┐│MNO││
││cd││┌───┬───┐││PQR││
││  │││0 1│0 1│││MNO││
││  ││└───┴───┘││   ││
││  │└─────────┘│   ││
│└──┴───────────┴───┘│
├────────────────────┤
│┌──┬───────────┬───┐│
││ab│┌─────────┐│MNO││
││cd││┌───┬───┐││PQR││
││  │││0 1│1 2│││MNO││
││  ││└───┴───┘││   ││
││  │└─────────┘│   ││
│└──┴───────────┴───┘│
├────────────────────┤
│┌──┬───────────┬───┐│
││ab│┌─────────┐│MNO││
││cd││┌───┬───┐││PQR││
││  │││1 2│0 1│││MNO││
││  ││└───┴───┘││   ││
││  │└─────────┘│   ││
│└──┴───────────┴───┘│
├────────────────────┤
│┌──┬───────────┬───┐│
││ab│┌─────────┐│MNO││
││cd││┌───┬───┐││PQR││
││  │││1 2│1 2│││MNO││
││  ││└───┴───┘││   ││
││  │└─────────┘│   ││
│└──┴───────────┴───┘│
└────────────────────┘
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to