Thue-Morse: Difference between revisions

Content added Content deleted
mNo edit summary
(→‎{{header|SQL}}: Added zkl)
Line 8: Line 8:
This example is using SQLite.
This example is using SQLite.
<lang SQL>with recursive a(a) as (select '0' union all select replace(replace(hex(a),30,'01'),31,'10') from a) select * from a;</lang>
<lang SQL>with recursive a(a) as (select '0' union all select replace(replace(hex(a),30,'01'),31,'10') from a) select * from a;</lang>

=={{header|zkl}}==
<lang zkl>fcn next(str){ str.pump(str,fcn(c){ (0x61 - c.toAsc()).toChar() }) }</lang>
<lang zkl>str:="0"; do(7){ str.println(); str=next(str) }</lang>
{{out}}
<pre>
0
01
0110
01101001
0110100110010110
01101001100101101001011001101001
0110100110010110100101100110100110010110011010010110100110010110
</pre>