Make that:
dtb2 =: {.~ # <. 1 + ' '&(= i: 0:)
Scratch that; it didn't handle the general case that *./ ' ' = y . I believe the following definition is correct in all corner cases:
dtb2 =: {.~ # (~: * ])&>: '.'&(= i: 0:)
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
