Not quite what was asked.
The intended outcome is a sequence of length 1000 where the elements are 1 * true, 2 * false, 3 * true, 4 * false and so on.<p>To compare it with what your code produces.<p>[true false false true  true true  false false false false ...]<p>[true false true  false true false true  false true  false ...]