Anonymous user
Thue-Morse: Difference between revisions
m
→using 2's complement: added whitespace, used a template for the output section.
m (→using in-line code: used a template for the output section, added whitespace.) |
m (→using 2's complement: added whitespace, used a template for the output section.) |
||
Line 1,513:
parse arg N . /*obtain the optional argument from CL.*/
if N=='' | N=="," then N=6 /*Not specified? Then use the default.*/
$=
do j=1 for N /*generate sequence up to the Nth item.*/
$= $ || translate($, 10, 01)
end /*j*/
say $ /*stick a fork in it, we're all done. */</lang>
<pre>
0110100110010110100101100110100110010110011010010110100110010110
|