3 categories::Core,Common methods
7 Create an object that behaves like a stream that returns values for a limited (or infinite) number of times.
9 For a full list of implementing classes, see link::Overviews/Methods#loop:: and link::Overviews/Methods#repeat::
12 ## link::Classes/Function#-loop:: ||
13 repeats the function forever.
16 x = Routine({ f.loop });
17 10.do({ x.next.postln })
20 ## link::Classes/Object#-repeat:: (n) ||
21 repeat to yield the object
28 ## link::Classes/Pattern#-repeat:: (n) ||
31 x = Prand([1, 2]).repeat(6).asStream;
35 ## link::Classes/Pattern#-loop:: ||
38 x = Prand([1, 2]).loop.asStream;
42 ## link::Classes/Stream#-repeat:: (n) ||
44 embeds the stream repeatedly
47 x = Routine({ 3.do({ arg i; i.yield }) }).repeat(6);
51 ## link::Classes/Stream#-loop:: ||
53 embeds the stream repeatedly
56 x = Routine({ 3.do({ arg i; i.yield }) }).loop;