From 9e751bb8c0cdf771d34c839cb6591d892b8e62de Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 7 Mar 2017 01:41:48 -0800 Subject: 3761 --- html/064list.mu.html | 257 ++++++++++++++++++++++++++------------------------- 1 file changed, 129 insertions(+), 128 deletions(-) (limited to 'html/064list.mu.html') diff --git a/html/064list.mu.html b/html/064list.mu.html index 417280f5..e0cd961c 100644 --- a/html/064list.mu.html +++ b/html/064list.mu.html @@ -15,15 +15,16 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color a { text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } -.muData { color: #ffff00; } -.muControl { color: #c0a020; } +.muRecipe { color: #ff8700; } +.muScenario { color: #00af00; } .Special { color: #c00000; } +.Conceal { color: #4e4e4e; } .Delimiter { color: #800080; } .Comment { color: #9090ff; } .Constant { color: #00a0a0; } .LineNr { color: #444444; } -.muRecipe { color: #ff8700; } -.muScenario { color: #00af00; } +.muControl { color: #c0a020; } +.muData { color: #ffff00; } --> @@ -90,22 +91,22 @@ if ('onhashchange' in window) { 30 31 scenario list-handling [ 32 run [ - 33 local-scope - 34 x:&:list:num <- push 3, 0 - 35 x <- push 4, x - 36 x <- push 5, x - 37 10:num/raw <- first x - 38 x <- rest x - 39 11:num/raw <- first x - 40 x <- rest x - 41 12:num/raw <- first x - 42 20:&:list:num/raw <- rest x + 33 ¦ local-scope + 34 ¦ x:&:list:num <- push 3, 0 + 35 ¦ x <- push 4, x + 36 ¦ x <- push 5, x + 37 ¦ 10:num/raw <- first x + 38 ¦ x <- rest x + 39 ¦ 11:num/raw <- first x + 40 ¦ x <- rest x + 41 ¦ 12:num/raw <- first x + 42 ¦ 20:&:list:num/raw <- rest x 43 ] 44 memory-should-contain [ - 45 10 <- 5 - 46 11 <- 4 - 47 12 <- 3 - 48 20 <- 0 # nothing left + 45 ¦ 10 <- 5 + 46 ¦ 11 <- 4 + 47 ¦ 12 <- 3 + 48 ¦ 20 <- 0 # nothing left 49 ] 50 ] 51 @@ -135,23 +136,23 @@ if ('onhashchange' in window) { 75 list <- push 4, list 76 list <- push 5, list 77 run [ - 78 list2:&:list:char <- rest list # inside list - 79 list2 <- insert 6, list2 - 80 # check structure - 81 list2 <- copy list - 82 10:char/raw <- first list2 - 83 list2 <- rest list2 - 84 11:char/raw <- first list2 - 85 list2 <- rest list2 - 86 12:char/raw <- first list2 - 87 list2 <- rest list2 - 88 13:char/raw <- first list2 + 78 ¦ list2:&:list:char <- rest list # inside list + 79 ¦ list2 <- insert 6, list2 + 80 ¦ # check structure + 81 ¦ list2 <- copy list + 82 ¦ 10:char/raw <- first list2 + 83 ¦ list2 <- rest list2 + 84 ¦ 11:char/raw <- first list2 + 85 ¦ list2 <- rest list2 + 86 ¦ 12:char/raw <- first list2 + 87 ¦ list2 <- rest list2 + 88 ¦ 13:char/raw <- first list2 89 ] 90 memory-should-contain [ - 91 10 <- 5 # scanning next - 92 11 <- 4 - 93 12 <- 6 # inserted element - 94 13 <- 3 + 91 ¦ 10 <- 5 # scanning next + 92 ¦ 11 <- 4 + 93 ¦ 12 <- 6 # inserted element + 94 ¦ 13 <- 3 95 ] 96 ] 97 @@ -161,24 +162,24 @@ if ('onhashchange' in window) { 101 list <- push 4, list 102 list <- push 5, list 103 run [ -104 list2:&:list:char <- rest list # inside list -105 list2 <- rest list2 # now at end of list -106 list2 <- insert 6, list2 -107 # check structure like before -108 list2 <- copy list -109 10:char/raw <- first list2 -110 list2 <- rest list2 -111 11:char/raw <- first list2 -112 list2 <- rest list2 -113 12:char/raw <- first list2 -114 list2 <- rest list2 -115 13:char/raw <- first list2 +104 ¦ list2:&:list:char <- rest list # inside list +105 ¦ list2 <- rest list2 # now at end of list +106 ¦ list2 <- insert 6, list2 +107 ¦ # check structure like before +108 ¦ list2 <- copy list +109 ¦ 10:char/raw <- first list2 +110 ¦ list2 <- rest list2 +111 ¦ 11:char/raw <- first list2 +112 ¦ list2 <- rest list2 +113 ¦ 12:char/raw <- first list2 +114 ¦ list2 <- rest list2 +115 ¦ 13:char/raw <- first list2 116 ] 117 memory-should-contain [ -118 10 <- 5 # scanning next -119 11 <- 4 -120 12 <- 3 -121 13 <- 6 # inserted element +118 ¦ 10 <- 5 # scanning next +119 ¦ 11 <- 4 +120 ¦ 12 <- 3 +121 ¦ 13 <- 6 # inserted element 122 ] 123 ] 124 @@ -188,22 +189,22 @@ if ('onhashchange' in window) { 128 list <- push 4, list 129 list <- push 5, list 130 run [ -131 list <- insert 6, list -132 # check structure like before -133 list2:&:list:char <- copy list -134 10:char/raw <- first list2 -135 list2 <- rest list2 -136 11:char/raw <- first list2 -137 list2 <- rest list2 -138 12:char/raw <- first list2 -139 list2 <- rest list2 -140 13:char/raw <- first list2 +131 ¦ list <- insert 6, list +132 ¦ # check structure like before +133 ¦ list2:&:list:char <- copy list +134 ¦ 10:char/raw <- first list2 +135 ¦ list2 <- rest list2 +136 ¦ 11:char/raw <- first list2 +137 ¦ list2 <- rest list2 +138 ¦ 12:char/raw <- first list2 +139 ¦ list2 <- rest list2 +140 ¦ 13:char/raw <- first list2 141 ] 142 memory-should-contain [ -143 10 <- 5 # scanning next -144 11 <- 6 # inserted element -145 12 <- 4 -146 13 <- 3 +143 ¦ 10 <- 5 # scanning next +144 ¦ 11 <- 6 # inserted element +145 ¦ 12 <- 4 +146 ¦ 13 <- 3 147 ] 148 ] 149 @@ -226,11 +227,11 @@ if ('onhashchange' in window) { 166 prev-node:&:list:_elem <- copy in 167 curr:&:list:_elem <- rest prev-node 168 { -169 return-unless curr -170 found?:bool <- equal curr, x -171 break-if found? -172 prev-node <- copy curr -173 curr <- rest curr +169 ¦ return-unless curr +170 ¦ found?:bool <- equal curr, x +171 ¦ break-if found? +172 ¦ prev-node <- copy curr +173 ¦ curr <- rest curr 174 } 175 # set its next pointer to skip 'x' 176 *prev-node <- put *prev-node, next:offset, next-node @@ -242,21 +243,21 @@ if ('onhashchange' in window) { 182 list <- push 4, list 183 list <- push 5, list 184 run [ -185 list2:&:list:char <- rest list # second element -186 list <- remove list2, list -187 10:bool/raw <- equal list2, 0 -188 # check structure like before -189 list2 <- copy list -190 11:char/raw <- first list2 -191 list2 <- rest list2 -192 12:char/raw <- first list2 -193 20:&:list:char/raw <- rest list2 +185 ¦ list2:&:list:char <- rest list # second element +186 ¦ list <- remove list2, list +187 ¦ 10:bool/raw <- equal list2, 0 +188 ¦ # check structure like before +189 ¦ list2 <- copy list +190 ¦ 11:char/raw <- first list2 +191 ¦ list2 <- rest list2 +192 ¦ 12:char/raw <- first list2 +193 ¦ 20:&:list:char/raw <- rest list2 194 ] 195 memory-should-contain [ -196 10 <- 0 # remove returned non-null -197 11 <- 5 # scanning next, skipping deleted element -198 12 <- 3 -199 20 <- 0 # no more elements +196 ¦ 10 <- 0 # remove returned non-null +197 ¦ 11 <- 5 # scanning next, skipping deleted element +198 ¦ 12 <- 3 +199 ¦ 20 <- 0 # no more elements 200 ] 201 ] 202 @@ -266,18 +267,18 @@ if ('onhashchange' in window) { 206 list <- push 4, list 207 list <- push 5, list 208 run [ -209 list <- remove list, list -210 # check structure like before -211 list2:&:list:char <- copy list -212 10:char/raw <- first list2 -213 list2 <- rest list2 -214 11:char/raw <- first list2 -215 20:&:list:char/raw <- rest list2 +209 ¦ list <- remove list, list +210 ¦ # check structure like before +211 ¦ list2:&:list:char <- copy list +212 ¦ 10:char/raw <- first list2 +213 ¦ list2 <- rest list2 +214 ¦ 11:char/raw <- first list2 +215 ¦ 20:&:list:char/raw <- rest list2 216 ] 217 memory-should-contain [ -218 10 <- 4 # scanning next, skipping deleted element -219 11 <- 3 -220 20 <- 0 # no more elements +218 ¦ 10 <- 4 # scanning next, skipping deleted element +219 ¦ 11 <- 3 +220 ¦ 20 <- 0 # no more elements 221 ] 222 ] 223 @@ -287,23 +288,23 @@ if ('onhashchange' in window) { 227 list <- push 4, list 228 list <- push 5, list 229 run [ -230 # delete last element -231 list2:&:list:char <- rest list -232 list2 <- rest list2 -233 list <- remove list2, list -234 10:bool/raw <- equal list2, 0 -235 # check structure like before -236 list2 <- copy list -237 11:char/raw <- first list2 -238 list2 <- rest list2 -239 12:char/raw <- first list2 -240 20:&:list:char/raw <- rest list2 +230 ¦ # delete last element +231 ¦ list2:&:list:char <- rest list +232 ¦ list2 <- rest list2 +233 ¦ list <- remove list2, list +234 ¦ 10:bool/raw <- equal list2, 0 +235 ¦ # check structure like before +236 ¦ list2 <- copy list +237 ¦ 11:char/raw <- first list2 +238 ¦ list2 <- rest list2 +239 ¦ 12:char/raw <- first list2 +240 ¦ 20:&:list:char/raw <- rest list2 241 ] 242 memory-should-contain [ -243 10 <- 0 # remove returned non-null -244 11 <- 5 # scanning next, skipping deleted element -245 12 <- 4 -246 20 <- 0 # no more elements +243 ¦ 10 <- 0 # remove returned non-null +244 ¦ 11 <- 5 # scanning next, skipping deleted element +245 ¦ 12 <- 4 +246 ¦ 20 <- 0 # no more elements 247 ] 248 ] 249 @@ -311,11 +312,11 @@ if ('onhashchange' in window) { 251 local-scope 252 list:&:list:char <- push 3, 0 253 run [ -254 list <- remove list, list -255 1:num/raw <- copy list +254 ¦ list <- remove list, list +255 ¦ 1:num/raw <- copy list 256 ] 257 memory-should-contain [ -258 1 <- 0 # back to an empty list +258 ¦ 1 <- 0 # back to an empty list 259 ] 260 ] 261 @@ -337,13 +338,13 @@ if ('onhashchange' in window) { 277 list <- push 2, list 278 list <- push 3, list 279 run [ -280 stash [list:], list -281 list <- reverse list -282 stash [reversed:], list +280 ¦ stash [list:], list +281 ¦ list <- reverse list +282 ¦ stash [reversed:], list 283 ] 284 trace-should-contain [ -285 app: list: 3 -> 2 -> 1 -286 app: reversed: 1 -> 2 -> 3 +285 ¦ app: list: 3 -> 2 -> 1 +286 ¦ app: reversed: 1 -> 2 -> 3 287 ] 288 ] 289 @@ -368,9 +369,9 @@ if ('onhashchange' in window) { 308 local-scope 309 load-ingredients 310 { -311 break-if in -312 buf <- append buf, [[]] -313 return +311 ¦ break-if in +312 ¦ buf <- append buf, [[]] +313 ¦ return 314 } 315 # append in.value to buf 316 val:_elem <- get *in, value:offset @@ -383,17 +384,17 @@ if ('onhashchange' in window) { 323 # and recurse 324 remaining:num, optional-ingredient-found?:bool <- next-ingredient 325 { -326 break-if optional-ingredient-found? -327 # unlimited recursion -328 buf <- to-buffer next, buf -329 return +326 ¦ break-if optional-ingredient-found? +327 ¦ # unlimited recursion +328 ¦ buf <- to-buffer next, buf +329 ¦ return 330 } 331 { -332 break-unless remaining -333 # limited recursion -334 remaining <- subtract remaining, 1 -335 buf <- to-buffer next, buf, remaining -336 return +332 ¦ break-unless remaining +333 ¦ # limited recursion +334 ¦ remaining <- subtract remaining, 1 +335 ¦ buf <- to-buffer next, buf, remaining +336 ¦ return 337 } 338 # past recursion depth; insert ellipses and stop 339 append buf, [...] @@ -403,10 +404,10 @@ if ('onhashchange' in window) { 343 local-scope 344 x:&:list:num <- copy 0 345 run [ -346 stash x +346 ¦ stash x 347 ] 348 trace-should-contain [ -349 app: [] +349 ¦ app: [] 350 ] 351 ] -- cgit 1.4.1-2-gfad0