Merge branch 'OOP' of https://scm.cri.ensmp.fr/git/Faustine into OOP
[Faustine.git] / documentation / code_VALInterpreter.interpret_ident.html
1 <html><head>
2 <link rel="stylesheet" href="style.css" type="text/css">
3 <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
4 <link rel="Start" href="index.html">
5 <link title="Index of types" rel=Appendix href="index_types.html">
6 <link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
7 <link title="Index of values" rel=Appendix href="index_values.html">
8 <link title="Index of modules" rel=Appendix href="index_modules.html">
9 <link title="Types" rel="Chapter" href="Types.html">
10 <link title="Parser" rel="Chapter" href="Parser.html">
11 <link title="Lexer" rel="Chapter" href="Lexer.html">
12 <link title="Value" rel="Chapter" href="Value.html">
13 <link title="Signal" rel="Chapter" href="Signal.html">
14 <link title="Faustexp" rel="Chapter" href="Faustexp.html">
15 <link title="Interpreter" rel="Chapter" href="Interpreter.html">
16 <link title="Preprocess" rel="Chapter" href="Preprocess.html">
17 <link title="Main" rel="Chapter" href="Main.html"><title>Interpreter.interpret_ident</title>
18 </head>
19 <body>
20 <code class="code"><span class="keyword">let</span>&nbsp;interpret_ident&nbsp;=&nbsp;<span class="keyword">fun</span>&nbsp;s&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">fun</span>&nbsp;input_beam&nbsp;<span class="keywordsign">-&gt;</span><br>
21 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">let</span>&nbsp;n&nbsp;=&nbsp;<span class="constructor">List</span>.length&nbsp;input_beam&nbsp;<span class="keyword">in</span><br>
22 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">match</span>&nbsp;s&nbsp;<span class="keyword">with</span><br>
23 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Pass</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;input_beam&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;_"</span>)<br>
24 <br>
25 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Stop</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[]&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;!"</span>)<br>
26 <br>
27 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Add</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_add&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
28 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;+"</span>)<br>
29 <br>
30 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Sup</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_sub&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
31 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;-"</span>)<br>
32 <br>
33 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Mul</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_mul&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
34 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;*"</span>)<br>
35 <br>
36 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Div</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_div&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
37 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;/"</span>)<br>
38 <br>
39 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Delay</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_delay&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
40 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;@"</span>)<br>
41 <br>
42 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Mem</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[signal_mem&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)]&nbsp;<br>
43 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;mem"</span>)<br>
44 <br>
45 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Vectorize</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_vectorize&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]<br>
46 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;vectorize"</span>)<br>
47 <br>
48 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Serialize</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[signal_serialize&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)]<br>
49 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;serialize"</span>)<br>
50 <br>
51 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Concat</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_append&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]<br>
52 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;#"</span>)<br>
53 <br>
54 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Nth</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_nth&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]<br>
55 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;[]"</span>)<br>
56 <br>
57 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Floor</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[signal_floor&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)]<br>
58 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;floor"</span>)<br>
59 <br>
60 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Int</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[signal_int&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)]<br>
61 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;int"</span>)<br>
62 <br>
63 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Sin</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[signal_sin&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)]<br>
64 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;sin"</span>)<br>
65 <br>
66 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Cos</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[signal_cos&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)]<br>
67 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;cos"</span>)<br>
68 <br>
69 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Atan</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[signal_atan&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)]<br>
70 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;atan"</span>)<br>
71 <br>
72 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Atantwo</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_atantwo&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]<br>
73 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;atantwo"</span>)<br>
74 <br>
75 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Sqrt</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;1&nbsp;<span class="keyword">then</span>&nbsp;[signal_sqrt&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)]<br>
76 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;sqrt"</span>)<br>
77 <br>
78 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Rdtable</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;3&nbsp;<span class="keyword">then</span>&nbsp;[signal_rdtable&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;<br>
79 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;2)]&nbsp;<br>
80 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;rdtable"</span>)<br>
81 <br>
82 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Selecttwo</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;3&nbsp;<span class="keyword">then</span>&nbsp;[signal_select2&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)&nbsp;<br>
83 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;2)]&nbsp;<br>
84 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;select2"</span>)<br>
85 <br>
86 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Selectthree</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;4&nbsp;<span class="keyword">then</span>&nbsp;[signal_select3&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)&nbsp;<br>
87 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;2)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;3)]&nbsp;<br>
88 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;select3"</span>)<br>
89 <br>
90 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Prefix</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_prefix&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
91 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;prefix"</span>)<br>
92 <br>
93 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Mod</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_mod&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
94 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;%"</span>)<br>
95 <br>
96 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Larger</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_sup&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
97 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;&gt;"</span>)<br>
98 <br>
99 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span><span class="constructor">Smaller</span>&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="keyword">if</span>&nbsp;n&nbsp;=&nbsp;2&nbsp;<span class="keyword">then</span>&nbsp;[signal_inf&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;0)&nbsp;(<span class="constructor">List</span>.nth&nbsp;input_beam&nbsp;1)]&nbsp;<br>
100 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;raise&nbsp;(<span class="constructor">Evaluation_Error</span>&nbsp;<span class="string">"Ident&nbsp;&lt;"</span>)</code></body></html>