with 4 row 3 column inverted table

   1 2 3 4 ; 5 6 7 8 ; <'a';'b';'c';'d'
┌───────┬───────┬─────────┐
│1 2 3 4│5 6 7 8│┌─┬─┬─┬─┐│
│       │       ││a│b│c│d││
│       │       │└─┴─┴─┴─┘│
└───────┴───────┴─────────┘

is there a way to scan through each record without doing this:

   <"1 &.|: > <"0 each 1 2 3 4 ; 5 6 7 8 ; <'a';'b';'c';'d'
┌─────────┬─────────┬─────────┬─────────┐
│┌─┬─┬───┐│┌─┬─┬───┐│┌─┬─┬───┐│┌─┬─┬───┐│
││1│5│┌─┐│││2│6│┌─┐│││3│7│┌─┐│││4│8│┌─┐││
││ │ ││a││││ │ ││b││││ │ ││c││││ │ ││d│││
││ │ │└─┘│││ │ │└─┘│││ │ │└─┘│││ │ │└─┘││
│└─┴─┴───┘│└─┴─┴───┘│└─┴─┴───┘│└─┴─┴───┘│
└─────────┴─────────┴─────────┴─────────┘

I was hoping for some version/combination of L: S: but I can't say I understand 
S:

  test =. 4 : 'a;b;<c [b=. b+ a [''a b c'' =. x'
    2 test  each/\ <"1 &.|: > <"0 each 1 2 3 4 ; 5 6 7 8 ; <'a';'b';'c';'d'
┌─────────┬─────────┬──────────┐
│┌─┬─┬───┐│┌─┬─┬───┐│┌─┬──┬───┐│
││1│6│┌─┐│││2│8│┌─┐│││3│10│┌─┐││
││ │ ││a││││ │ ││b││││ │  ││c│││
││ │ │└─┘│││ │ │└─┘│││ │  │└─┘││
│└─┴─┴───┘│└─┴─┴───┘│└─┴──┴───┘│
└─────────┴─────────┴──────────┘

 

Maybe  <"1 &.|: > <"0 each is actually really good?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to