From 9570363aec35e187e2395b1760a4b94e71580ac9 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 29 Jul 2015 15:55:05 -0700 Subject: 1885 --- html/063list.mu.html | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'html/063list.mu.html') diff --git a/html/063list.mu.html b/html/063list.mu.html index 9763729b..50060a5f 100644 --- a/html/063list.mu.html +++ b/html/063list.mu.html @@ -13,13 +13,13 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; } body { font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 1.05em; } +.muRecipe { color: #ff8700; } .muScenario { color: #00af00; } -.CommentedCode { color: #6c6c6c; } .Comment { color: #9090ff; } .Constant { color: #00a0a0; } .Special { color: #ff6060; } +.CommentedCode { color: #6c6c6c; } .muControl { color: #c0a020; } -.muRecipe { color: #ff8700; } --> @@ -47,48 +47,48 @@ container list [ x:location <- next-ingredient in:address:list <- next-ingredient result:address:list <- new list:type - val:address:location <- get-address result:address:list/deref, value:offset - val:address:location/deref <- copy x:location - next:address:address:list <- get-address result:address:list/deref, next:offset - next:address:address:list/deref <- copy in:address:list - reply result:address:list + val:address:location <- get-address *result, value:offset + *val <- copy x + next:address:address:list <- get-address *result, next:offset + *next <- copy in + reply result ] # result:location <- first in:address:list recipe first [ local-scope in:address:list <- next-ingredient - result:location <- get in:address:list/deref, value:offset - reply result:location + result:location <- get *in, value:offset + reply result ] # result:address:list <- rest in:address:list recipe rest [ local-scope in:address:list <- next-ingredient - result:address:list <- get in:address:list/deref, next:offset - reply result:address:list + result:address:list <- get *in, next:offset + reply result ] scenario list-handling [ run [ #? $start-tracing #? 1 - 1:address:list <- copy 0:literal - 1:address:list <- push 3:literal, 1:address:list - 1:address:list <- push 4:literal, 1:address:list - 1:address:list <- push 5:literal, 1:address:list - 2:number <- first 1:address:list - 1:address:list <- rest 1:address:list - 3:number <- first 1:address:list - 1:address:list <- rest 1:address:list - 4:number <- first 1:address:list - 1:address:list <- rest 1:address:list + 1:address:list <- copy 0 + 1:address:list <- push 3, 1:address:list + 1:address:list <- push 4, 1:address:list + 1:address:list <- push 5, 1:address:list + 2:number <- first 1:address:list + 1:address:list <- rest 1:address:list + 3:number <- first 1:address:list + 1:address:list <- rest 1:address:list + 4:number <- first 1:address:list + 1:address:list <- rest 1:address:list ] memory-should-contain [ - 1 <- 0 # empty to empty, dust to dust.. - 2 <- 5 - 3 <- 4 - 4 <- 3 + 1 <- 0 # empty to empty, dust to dust.. + 2 <- 5 + 3 <- 4 + 4 <- 3 ] ] -- cgit 1.4.1-2-gfad0