Combination of 6 items taken 2 at a time:

comb=: ((= +/"1) |.@:I.@# ]) #:@i.@(2&^)

  |: 2 comb 6

0 0 0 0 0 1 1 1 1 2 2 2 3 3 4

1 2 3 4 5 2 3 4 5 3 4 5 4 5 5


How can I box each column with the vertical pair of numbers in each box?


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

Reply via email to