Thue-Morse: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: added/changed comments and whitespace, changed indentations.)
(Added Ruby)
Line 519:
'''output'''   when using the default input:
<pre>
0110100110010110100101100110100110010110011010010110100110010110
</pre>
 
=={{header|Ruby}}==
<lang ruby>puts s = "0"
6.times{puts s << s.tr("01","10")}</lang>
 
{{out}}
<pre>
0
01
0110
01101001
0110100110010110
01101001100101101001011001101001
0110100110010110100101100110100110010110011010010110100110010110
</pre>