> I have to admit I overlooked /. . I will carefully go through the > entire dictionary once more. > Yeah, the empty slot... I could find a workaround, but a solution that > takes it into account will still be appreciated.
I'd build a boolean argumento to #^:_1 (APL's expand) by starting from 2 -~/\ ~._1,0{a which identifies the skip in the sequence. Of course, if the skip is >1 (you left out the 3 in your example, but you could have left out 3 AND 4, in which case you'd need two empty boxes). I put together this: (;(2 -~/\ ~._1,0{a)|.@{. each 1) #^:_1 </./a ----T-------T---------TT-----T---┐ │5 0│7 8 9 2│2 5 5 5 3││8 0 0│5 6│ L---+-------+---------++-----+---- which seems to work (but may very well be wrong, and is not very elegant because of the "each"). -- Stefano [ "There are some people who, if they don't already know, you can't tell 'em." --- Yogi Berra ] ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm