-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpr6.spl
More file actions
43 lines (41 loc) · 1.2 KB
/
pr6.spl
File metadata and controls
43 lines (41 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
incrementStream(3);
flag = True;
If (streamLength(0) == 1) Then (
Print(getStream(0, 0)))
Else If (streamLength(0) == 2) Then (
Print(getStream(0, 0));
Print(getStream(0, 1));
Print(getStream(1, 0));
Print(getStream(1, 1)))
Else While (flag) Then (
Print(getStream(0, 0));
Print(getStream(0, 1));
Print(getStream(1, 0));
Print(getStream(1, 1));
Print(getStream(1, 2));
reduceStream(0);
reduceStream(0);
reduceStream(1);
reduceStream(1);
reduceStream(1);
a = streamLength(0);
b = streamLength(1);
incrementStream(3);
If ((streamLength(0) == 1) && (streamLength(1) == 0)) Then (
Print(getStream(0, 0));
flag = False)
Else (If ((streamLength(0) >= 2) && (streamLength(1) == 0)) Then (
Print(getStream(0, 0));
Print(getStream(0, 1));
flag = False)
Else (If ((streamLength(0) >= 2) && (streamLength(1) == 1)) Then (
Print(getStream(0, 0));
Print(getStream(0, 1));
Print(getStream(1, 0));
flag = False)
Else (If ((streamLength(0) >= 2) && (streamLength(1) == 2)) Then (
Print(getStream(0, 0));
Print(getStream(0, 1));
Print(getStream(1, 0));
Print(getStream(1, 1));
flag = False) Else False))))