let alt_seq2 s = let len = Array.length s in let r = ref true in for i = 1 to len - 1 do r := !r && (s.(i-1) <> s.(i)) done; !r