2 summary:: combinatoric pattern
3 related:: Classes/PstepNadd
4 categories:: Streams-Patterns-Events>Patterns>Time
8 Combines an arbitrary number of patterns by evaluating a function (depth first traversal). When a stream ends it is recreated from its pattern until the top stream ends.
18 Pseq([1, 2, 3]), Pseq([4, 5, 6]), Pseq([7, 8, 9])
26 r = vals.copy.removeAt(0);
27 vals.do({ arg item; r = item / r.squared * 10 });
34 Pseq([0.1, 3, 0.2, 3])
38 50.do({ x.next.postln });
41 // note that if the last pattern loops it will stick to that one:
46 x = PstepNfunc(f, [Pseq([1, 2, 3]), Pseq([10, 20, 30, 40]), Pseq([100, 200, 300], inf)]).asStream;
53 vals.inject(1, { arg x, y; x * y })
59 Pseq([0.1, 3, 0.2, 3])
63 50.do({ x.next.postln });