h=. 13 :'({.x){"((#$y)-{:x)y' NB. {.x i {:x nThis fails if you go out of bounds. Roger almost certainly has a better answer.
Ralph Selfridge ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
