about summary refs log tree commit diff stats
path: root/html/lambda-to-mu.mu.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-12 18:00:47 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-12 18:00:47 -0700
commite07cbe5edfef74005a56205586202e9a224f0500 (patch)
tree28f15db3a56d77e1716fcc7e82f451f097d0ee1a /html/lambda-to-mu.mu.html
parent32983f88e46082ebdbf3357ea488beda9497ce38 (diff)
downloadmu-e07cbe5edfef74005a56205586202e9a224f0500.tar.gz
3174
Diffstat (limited to 'html/lambda-to-mu.mu.html')
-rw-r--r--html/lambda-to-mu.mu.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/html/lambda-to-mu.mu.html b/html/lambda-to-mu.mu.html
index 0478a1b7..d93a8b00 100644
--- a/html/lambda-to-mu.mu.html
+++ b/html/lambda-to-mu.mu.html
@@ -599,6 +599,24 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
     <span class="Constant">40</span>:array:character<span class="Special"> &lt;- </span><span class="Constant">[ghi]</span>  <span class="Comment"># result.rest.rest</span>
   ]
 ]
+
+<span class="SalientComment">## convert tree of cells to mu text</span>
+
+<span class="muRecipe">def</span> to-mu in:address:cell<span class="muRecipe"> -&gt; </span>out:address:array:character [
+  <span class="Constant">local-scope</span>
+  <span class="Constant">load-ingredients</span>
+  buf:address:buffer<span class="Special"> &lt;- </span>new-buffer <span class="Constant">30</span>
+  buf<span class="Special"> &lt;- </span>to-mu in, buf
+  out<span class="Special"> &lt;- </span>buffer-to-array buf
+]
+
+<span class="muRecipe">def</span> to-mu in:address:cell, buf:address:buffer<span class="muRecipe"> -&gt; </span>buf:address:buffer, result-name:address:array:character [
+  <span class="Constant">local-scope</span>
+  <span class="Constant">load-ingredients</span>
+  <span class="Comment"># null cell? no change.</span>
+  <span class="Comment"># pair with all atoms? gensym a new variable</span>
+  <span class="Comment"># pair containing other pairs? recurse</span>
+]
 </pre>
 </body>
 </html>
46eaab'>^
b0a216f5 ^



3a1e1f28 ^
b0a216f5 ^


b06433bc ^
2c5ea01d ^
b0a216f5 ^

2c5ea01d ^
2c5ea01d ^
582f3519 ^
b06433bc ^
582f3519 ^

94c5d83e ^
dee6cfa6 ^
e9e4b4ff ^
b0a216f5 ^


e9e4b4ff ^





ad75190c ^
e9e4b4ff ^
c7720fff ^



8d21b83c ^


e9e4b4ff ^
25a4162d ^
e9e4b4ff ^
0c2c782d ^
636d9393 ^
b0a216f5 ^
b3bc8431 ^
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