scide: implement selectionLength for openDocument
[supercollider.git] / HelpSource / Classes / Pselect.schelp
blob8488580b7ffcf7ddec7ce3235a9a8c08c659324d
1 class:: Pselect
2 summary:: Select values from a pattern
3 categories:: Streams-Patterns-Events>Patterns>Filter
4 related:: Classes/Pcollect, Classes/Preject
6 description::
7 Returns 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 = Pselect({ arg item; item != 2 }, Pseq(#[1, 2, 3],inf));
24 x = a.asStream;
25 9.do({ x.next.postln; });
29 The message code::select:: returns a Pselect when passed to a pattern.
30 code::
32 var a, b;
33 a = Pseq(#[1, 2, 3],inf).select({ arg item; item != 2 });
34 a.postln;
35 x = a.asStream;
36 9.do({ x.next.postln; });