Task

Create a Thue-Morse sequence.



See also
   YouTube entry: The Fairest Sharing Sequence Ever
   YouTube entry: Math and OCD - My story with the Thue-Morse sequence
   Task: Fairshare between two and more


get "libhdr"
 
let parity(x) = 
    x=0 -> 0,
    (x&1) neqv parity(x>>1)
 
let start() be
$(  for i=0 to 63 do writen(parity(i))
    wrch('*N')
$)