1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"949.43">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; color: #0021e7}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; color: #0033f1; min-height: 14.0px}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco
; min-height: 16.0px}
17 span
.s1
{font: 18.0px Helvetica
}
18 span
.s2
{color: #002eaf}
19 span
.s3
{color: #000000}
20 span
.s4
{text-decoration: underline
}
21 span
.s5
{text-decoration: underline
; color: #002fe0}
22 span
.s6
{color: #002fe0}
23 span
.s7
{color: #0024f8}
24 span
.Apple-tab-span
{white-space:pre
}
28 <p class=
"p1"><span class=
"s1"><b>BinaryOpStream
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>two
</b><span class=
"s1"><b> </b></span><b>streams combined by a binary operator
<span class=
"Apple-converted-space"> </span></b></p>
29 <p class=
"p2"><br></p>
30 <p class=
"p1"><b>superclass:
</b><a href=
"Stream.html"><span class=
"s2">Stream
</span></a></p>
31 <p class=
"p2"><br></p>
32 <p class=
"p3"><span class=
"s3">see also
<a href=
"UnaryOpStream.html"><span class=
"s4">UnaryOpStream
</span></a></span><span class=
"s5">,
</span><span class=
"s6"> <a href=
"NAryOpStream.html"><span class=
"s7">NAryOpStream
</span></a></span></p>
33 <p class=
"p4"><br></p>
34 <p class=
"p2"><br></p>
35 <p class=
"p1">A BinaryOpStream is created as a result of a binary math operation on a pair
</p>
36 <p class=
"p1">of Streams. It is defined to respond to
<b>next
</b> by returning the result of the math operation
</p>
37 <p class=
"p1">on the
<b>next
</b> value from both streams. It responds to
<b>reset
</b> by resetting both Streams.
</p>
38 <p class=
"p2"><br></p>
39 <p class=
"p5">x =
<span class=
"s2">Routine
</span> {
6.do {
<span class=
"s2">arg
</span> i; i.yield; } } +
64;
</p>
40 <p class=
"p5">x.dump
</p>
41 <p class=
"p6"><br></p>
43 <p class=
"p5">x =
<span class=
"s2">Routine
</span> {
6.do {
<span class=
"s2">arg
</span> i; i.yield; } } +
64;
</p>
44 <p class=
"p5">x.next.postln;
</p>
45 <p class=
"p5">x.next.postln;
</p>
46 <p class=
"p5">x.next.postln;
</p>
47 <p class=
"p5">x.next.postln;
</p>
48 <p class=
"p5">x.next.postln;
</p>
49 <p class=
"p5">x.next.postln;
</p>
50 <p class=
"p5">x.next.postln;
</p>
52 <p class=
"p7"><br></p>
53 <p class=
"p7"><br></p>
55 <p class=
"p5">x =
<span class=
"s2">Routine
</span> {
6.do {
<span class=
"s2">arg
</span> i; i.yield; } } +
<span class=
"s2">Routine
</span> { (
1.
.7).do {
<span class=
"s2">arg
</span> i; (
1 / i).yield; } };
</p>
56 <p class=
"p5">x.next.postln;
</p>
57 <p class=
"p5">x.next.postln;
</p>
58 <p class=
"p5">x.next.postln;
</p>
59 <p class=
"p5">x.next.postln;
</p>
60 <p class=
"p5">x.next.postln;
</p>
61 <p class=
"p5">x.next.postln;
</p>
62 <p class=
"p5">x.next.postln;
</p>
64 <p class=
"p7"><br></p>
65 <p class=
"p7"><br></p>