Forgot a help fix: Drag a dock's title bar, not divider, to reposition
[supercollider.git] / HelpSource / Classes / Preject.schelp
blob483fb105eda0d94ceb671a00846c4828d4b63ea7
1 class:: Preject
2 summary:: Reject values from a pattern
3 categories:: Streams-Patterns-Events>Patterns>Filter
4 related:: Classes/Pselect, Classes/Pcollect
6 description::
7 Rejects values for which the function returns true. The value is passed to the function.
10 classmethods::
12 method:: new
13 argument:: func
14 A link::Classes/Function::. Receives values from code::pattern::.
15 argument:: pattern
16 A link::Classes/Pattern::.
19 examples::
20 code::
22 var a, b;
23 a = Preject({ arg item; item == 1 }, Pseq(#[1, 2, 3],inf));
24 x = a.asStream;
25 9.do({ x.next.postln; });
29 The message reject returns a Preject when passed to a pattern
30 code::
32 var a, b;
33 a = Pseq(#[1, 2, 3],inf).reject({ arg item; item == 1 });
34 a.postln;
35 x = a.asStream;
36 9.do({ x.next.postln; });