Thue-Morse: Difference between revisions

Add APL
(Add PL/M)
(Add APL)
Line 180:
0110100110010110100101100110100110010110011010010110100110010110
</pre>
 
=={{header|APL}}==
<syntaxhighlight lang="apl">⍝ generate the first ⍵ elements of the Thue-Morse sequence
tm←{⍵⍴(⊢,~)⍣(⍵≤(⍴⊢))⊢,0}</syntaxhighlight>
{{out}}
<pre> tm 32
0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1</pre>
 
=={{header|AppleScript}}==
2,114

edits