-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcontrol.sst
117 lines (82 loc) · 2.21 KB
/
control.sst
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
(begin) => #void
(begin 0) => 0
(begin 0 1) => 1
(begin 0 1 2) => 2
(begin) => #void
(begin #void) => #void
(begin 0 1 2) => 2
(begin (begin)) => #void
(begin (begin 0 1 2)) => 2
(if #t 1 2) => 1
(if #f 1 2) => 2
(if #t 1) => 1
(if #f 1) => #void
(if #null 1 2) => 1
(if 0 1 2) => 1
(if 1 2 3) => 2
(when #t 0) => 0
(when #t 0 1) => 1
(when #t 0 1 2) => 2
(when #f 0) => #void
(when #f 0 1) => #void
(when #f 0 1 2) => #void
(when #null 0 1) => 1
(when 0 1 2) => 2
(when 1 2 3) => 3
(unless #f 0) => 0
(unless #f 0 1) => 1
(unless #f 0 1 2) => 2
(unless #t 0) => #void
(unless #t 0 1) => #void
(unless #t 0 1 2) => #void
(unless #null 0 1) => #void
(unless 0 1 2) => #void
(unless 1 2 3) => #void
(cond) => #void
(cond (else #null)) => #null
(cond (else)) => #t
(cond (#t)) => #t
(cond (#t 0)) => 0
(cond (#t 0 1)) => 1
(cond (#t 0 1 2)) => 2
(cond (#f)) => #void
(cond (#f 0)) => #void
(cond (#f 0 1)) => #void
(cond (#f 0 1 2)) => #void
(cond (#t 0) (#t 1) (#t 2) (else 3)) => 0
(cond (#f 0) (#t 1) (#t 2) (else 3)) => 1
(cond (#f 0) (#f 1) (#t 2) (else 3)) => 2
(cond (#f 0) (#f 1) (#f 2) (else 3)) => 3
(cond (#null)) => #null
(cond (0)) => 0
(cond (1)) => 1
(cond (#null 1)) => 1
(cond (0 1 2)) => 2
(cond (1 2 3)) => 3
(case 0) => #void
(case 0 (else #null)) => #null
(case 0 (else)) => 0
(case 0 ((0) 'a)) => 'a
(case 1 ((0) 'a)) => #void
(case 0 ((0) 'a) ((0) 'b)) => 'a
(case 1 ((0) 'a) ((0) 'b)) => #void
(case 0 ((0) 'a) ((1) 'b) ((2) 'c)) => 'a
(case 1 ((0) 'a) ((1) 'b) ((2) 'c)) => 'b
(case 2 ((0) 'a) ((1) 'b) ((2) 'c)) => 'c
(case 3 ((0) 'a) ((1) 'b) ((2) 'c)) => #void
(case 3 ((0) 'a) ((1) 'b) ((2) 'c) (else 'd)) => 'd
(case 0 ((0 1 2) 'a) ((0 1 2 3 4) 'b) (else 'c)) => 'a
(case 1 ((0 1 2) 'a) ((0 1 2 3 4) 'b) (else 'c)) => 'a
(case 2 ((0 1 2) 'a) ((0 1 2 3 4) 'b) (else 'c)) => 'a
(case 3 ((0 1 2) 'a) ((0 1 2 3 4) 'b) (else 'c)) => 'b
(case 4 ((0 1 2) 'a) ((0 1 2 3 4) 'b) (else 'c)) => 'b
(case 5 ((0 1 2) 'a) ((0 1 2 3 4) 'b) (else 'c)) => 'c
(case 0 (())) => #void
(case 0 ((0))) => 0
(case 1 ((0))) => #void
(case 0 ((0 1)) ((2 3))) => 0
(case 1 ((0 1)) ((2 3))) => 1
(case 2 ((0 1)) ((2 3))) => 2
(case 3 ((0 1)) ((2 3))) => 3
(case 4 ((0 1)) ((2 3))) => #void
(case 4 ((0 1)) ((2 3)) (else)) => 4