Another approach? alternates =: [: -. 1 e. [: +/ 0 1 |."0 1 ] #"_ 1~ +./ noAnds =: *./@(-.@(*./)) check =: noAnds *. alternates
-- (B=) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
