In cljs, {{clojure.core.async/random-array}}'s shuffle was incorrect, leading it to always return \[1 0\] for arg n=2. This breaks the promise that alts! is non-deterministic w.r.t. op selection by always trying the second element first. Additionally, the first op is never chosen first for alts! of any size N>1.
Use goog.array.shuffle to do the shuffle instead. (This API is also used by cljs.core/shuffle)
New implementation passes tests and behaves better:
{code:java}
cljs.user=> (frequencies (take 10000 (map vec (repeatedly #(a/random-array 2)))))
WARNING: var: cljs.core.async/random-array is not public at line 1 <cljs repl>
{[0 1] 4964, [1 0] 5036}
cljs.user=> (frequencies (take 10000 (map vec (repeatedly #(clojure.core.async/random-array 3)))))
WARNING: var: cljs.core.async/random-array is not public at line 1 <cljs repl>
{[0 1 2] 1720, [1 2 0] 1679, [2 0 1] 1669, [0 2 1] 1573, [1 0 2] 1682, [2 1 0] 1677}
cljs.user=> (pp)
{[0 1 2] 1720,
[1 2 0] 1679,
[2 0 1] 1669,
[0 2 1] 1573,
[1 0 2] 1682,
[2 1 0] 1677}
nil