Thue-Morse: Difference between revisions

Content added Content deleted
m (→‎{{header|11l}}: popcount())
m (→‎{{header|11l}}: bits:popcount())
Line 15: Line 15:


<syntaxhighlight lang="11l">F thue_morse_digits(digits)
<syntaxhighlight lang="11l">F thue_morse_digits(digits)
R (0 .< digits).map(n -> n.popcount() % 2)
R (0 .< digits).map(n -> bits:popcount(n) % 2)


print(thue_morse_digits(20))</syntaxhighlight>
print(thue_morse_digits(20))</syntaxhighlight>