about summary refs log tree commit diff stats
path: root/html/064list.mu.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/064list.mu.html')
-rw-r--r--html/064list.mu.html79
1 files changed, 45 insertions, 34 deletions
diff --git a/html/064list.mu.html b/html/064list.mu.html
index 236bf533..a0b2d805 100644
--- a/html/064list.mu.html
+++ b/html/064list.mu.html
@@ -45,7 +45,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="muRecipe">def</span> push x:_elem, in:&amp;:list:_elem<span class="muRecipe"> -&gt; </span>result:&amp;:list:_elem [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
-  result<span class="Special"> &lt;- </span>new <span class="Delimiter">{</span>(list _elem): type<span class="Delimiter">}</span>
+  result<span class="Special"> &lt;- </span>new <span class="Delimiter">{</span>(list _elem): <span class="muData">type</span><span class="Delimiter">}</span>
   *result<span class="Special"> &lt;- </span>merge x, in
 ]
 
@@ -95,7 +95,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="muRecipe">def</span> insert x:_elem, in:&amp;:list:_elem<span class="muRecipe"> -&gt; </span>in:&amp;:list:_elem [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
-  new-node:&amp;:list:_elem<span class="Special"> &lt;- </span>new <span class="Delimiter">{</span>(list _elem): type<span class="Delimiter">}</span>
+  new-node:&amp;:list:_elem<span class="Special"> &lt;- </span>new <span class="Delimiter">{</span>(list _elem): <span class="muData">type</span><span class="Delimiter">}</span>
   *new-node<span class="Special"> &lt;- </span>put *new-node, <span class="Constant">value:offset</span>, x
   next-node:&amp;:list:_elem<span class="Special"> &lt;- </span>get *in, <span class="Constant">next:offset</span>
   *in<span class="Special"> &lt;- </span>put *in, <span class="Constant">next:offset</span>, new-node
@@ -103,11 +103,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="muScenario">scenario</span> inserting-into-list [
+  <span class="Constant">local-scope</span>
+  list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
+  list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
+  list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
   run [
-    <span class="Constant">local-scope</span>
-    list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
-    list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
-    list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
     list2:&amp;:list:char<span class="Special"> &lt;- </span>rest list  <span class="Comment"># inside list</span>
     list2<span class="Special"> &lt;- </span>insert <span class="Constant">6</span>, list2
     <span class="Comment"># check structure</span>
@@ -129,11 +129,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="muScenario">scenario</span> inserting-at-end-of-list [
+  <span class="Constant">local-scope</span>
+  list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
+  list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
+  list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
   run [
-    <span class="Constant">local-scope</span>
-    list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
-    list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
-    list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
     list2:&amp;:list:char<span class="Special"> &lt;- </span>rest list  <span class="Comment"># inside list</span>
     list2<span class="Special"> &lt;- </span>rest list2  <span class="Comment"># now at end of list</span>
     list2<span class="Special"> &lt;- </span>insert <span class="Constant">6</span>, list2
@@ -156,11 +156,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="muScenario">scenario</span> inserting-after-start-of-list [
+  <span class="Constant">local-scope</span>
+  list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
+  list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
+  list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
   run [
-    <span class="Constant">local-scope</span>
-    list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
-    list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
-    list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
     list<span class="Special"> &lt;- </span>insert <span class="Constant">6</span>, list
     <span class="Comment"># check structure like before</span>
     list2:&amp;:list:char<span class="Special"> &lt;- </span>copy list
@@ -210,11 +210,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="muScenario">scenario</span> removing-from-list [
+  <span class="Constant">local-scope</span>
+  list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
+  list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
+  list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
   run [
-    <span class="Constant">local-scope</span>
-    list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
-    list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
-    list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
     list2:&amp;:list:char<span class="Special"> &lt;- </span>rest list  <span class="Comment"># second element</span>
     list<span class="Special"> &lt;- </span>remove list2, list
     <span class="Constant">10</span>:bool/<span class="Special">raw &lt;- </span>equal list2, <span class="Constant">0</span>
@@ -234,11 +234,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="muScenario">scenario</span> removing-from-start-of-list [
+  <span class="Constant">local-scope</span>
+  list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
+  list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
+  list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
   run [
-    <span class="Constant">local-scope</span>
-    list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
-    list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
-    list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
     list<span class="Special"> &lt;- </span>remove list, list
     <span class="Comment"># check structure like before</span>
     list2:&amp;:list:char<span class="Special"> &lt;- </span>copy list
@@ -255,11 +255,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="muScenario">scenario</span> removing-from-end-of-list [
+  <span class="Constant">local-scope</span>
+  list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
+  list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
+  list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
   run [
-    <span class="Constant">local-scope</span>
-    list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
-    list<span class="Special"> &lt;- </span>push <span class="Constant">4</span>, list
-    list<span class="Special"> &lt;- </span>push <span class="Constant">5</span>, list
     <span class="Comment"># delete last element</span>
     list2:&amp;:list:char<span class="Special"> &lt;- </span>rest list
     list2<span class="Special"> &lt;- </span>rest list2
@@ -281,9 +281,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="muScenario">scenario</span> removing-from-singleton-list [
+  <span class="Constant">local-scope</span>
+  list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
   run [
-    <span class="Constant">local-scope</span>
-    list:&amp;:list:char<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, <span class="Constant">0</span>
     list<span class="Special"> &lt;- </span>remove list, list
     <span class="Constant">1</span>:num/<span class="Special">raw &lt;- </span>copy list
   ]
@@ -305,13 +305,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="muScenario">scenario</span> reverse-list [
+  <span class="Constant">local-scope</span>
+  list:&amp;:list:number<span class="Special"> &lt;- </span>push <span class="Constant">1</span>, <span class="Constant">0</span>
+  list<span class="Special"> &lt;- </span>push <span class="Constant">2</span>, list
+  list<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, list
   run [
-    <span class="Constant">local-scope</span>
-    list:&amp;:list:number<span class="Special"> &lt;- </span>push <span class="Constant">1</span>, <span class="Constant">0</span>
-    list<span class="Special"> &lt;- </span>push <span class="Constant">2</span>, list
-    list<span class="Special"> &lt;- </span>push <span class="Constant">3</span>, list
     stash <span class="Constant">[list:]</span>, list
-    list<span class="Special"> &lt;- </span>reverse list, <span class="Constant">0</span>
+    list<span class="Special"> &lt;- </span>reverse list
     stash <span class="Constant">[reversed:]</span>, list
   ]
   trace-should-contain [
@@ -342,7 +342,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   <span class="Constant">load-ingredients</span>
   <span class="Delimiter">{</span>
     <span class="muControl">break-if</span> in
-    buf<span class="Special"> &lt;- </span>append buf, <span class="Constant">48/0</span>
+    buf<span class="Special"> &lt;- </span>append buf, <span class="Constant">[[]</span>]
     <span class="muControl">return</span>
   <span class="Delimiter">}</span>
   <span class="Comment"># append in.value to buf</span>
@@ -371,6 +371,17 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   <span class="Comment"># past recursion depth; insert ellipses and stop</span>
   append buf, <span class="Constant">[...]</span>
 ]
+
+<span class="muScenario">scenario</span> stash-empty-list [
+  <span class="Constant">local-scope</span>
+  x:&amp;:list:num<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>
+  run [
+    stash x
+  ]
+  trace-should-contain [
+    app: <span class="Constant">[]</span>
+  ]
+]
 </pre>
 </body>
 </html>
anger/blame/README?h=v1.7.1&id=b8d08418a72a71526a6dbac167e9588f5002610f'>^
36e4e71e ^




4ea0f69a ^
e71c8103 ^

36e4e71e ^

f6ae504c ^
4ea0f69a ^
36e4e71e ^

4ea0f69a ^

36e4e71e ^






4ea0f69a ^

306c76d8 ^






b6aff4c3 ^

306c76d8 ^
4ea0f69a ^

45cf5174 ^

08bc4ef9 ^

b34fd133 ^
08bc4ef9 ^

08bc4ef9 ^




08bc4ef9 ^


b34fd133 ^
08bc4ef9 ^


45cf5174 ^





fab4dc54 ^
45cf5174 ^



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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154