N (1 e.([#1:)E.]) 1 0 ...
On Oct 13, 2011 5:58 PM, "David Vaughan" <[email protected]> wrote: > > How could I test if a boolean list contains at least n consecutive 1's? > > e.g. for 3 consecutive 1's: > > desiredverb 0 1 1 1 0 0 > 1 > desiredverb 0 1 1 0 1 1 > 0 > desiredverb 1 1 1 1 1 0 > 1 > > Thanks. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
