fork(2) download
  1. object Main extends App {
  2. val n = 8
  3. val array = "0101101011010101010101101011010110101101010101011010110101101011"
  4. array.sliding(n).filterNot(_.containsSlice("11")).foreach(println)
  5. }
Success #stdin #stdout 0.42s 322176KB
stdin
Standard input is empty
stdout
10101010
01010101
10101010
01010101
10101010
01010101
10101010
01010101
10101010
01010101