Jump to content

Integer sequence: Difference between revisions

→‎{{header|SuperCollider}}: a fix and an addition
(add BQN)
(→‎{{header|SuperCollider}}: a fix and an addition)
Line 2,373:
<lang SuperCollider>
i = Routine { inf.do { |i| i.yield } }; // return all integers, represented by a 64 bit signed float.
j =fork { inf.do { i.next.postln; 0.01.wait } }; // this prints them incrementally
</lang>
j.play;
 
A shorter form of the first line above, using list comprehensions:
<lang SuperCollider>
i = {:i, i<-(0..) };
</lang>
 
83

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.