From 0e4a335edc7d4e584924fd6b298156e45d2626c8 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 6 Sep 2015 16:35:46 -0700 Subject: 2175 --- html/063list.mu.html | 82 +++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 43 deletions(-) (limited to 'html/063list.mu.html') diff --git a/html/063list.mu.html b/html/063list.mu.html index 7d106ca0..320049a1 100644 --- a/html/063list.mu.html +++ b/html/063list.mu.html @@ -13,13 +13,10 @@ 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; } -.Comment { color: #9090ff; } -.Constant { color: #00a0a0; } .Special { color: #ff6060; } -.CommentedCode { color: #6c6c6c; } -.muControl { color: #c0a020; } +.Comment { color: #9090ff; } +.Underlined { color: #c000c0; text-decoration: underline; } +.Identifier { color: #804000; } --> @@ -32,7 +29,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 # A list links up multiple objects together to make them easier to manage.
-#
+#
 # Try to make all objects in a single list of the same type, it'll help avoid bugs.
 # If you want to store multiple types in a single list, use an exclusive-container.
 
@@ -42,53 +39,52 @@ container list [
 ]
 
 # result:address:list <- push x:location, in:address:list
-recipe push [
-  local-scope
-  x:location <- next-ingredient
-  in:address:list <- next-ingredient
-  result:address:list <- new list:type
-  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
+recipe push [
+  local-scope
+  x:location <- next-ingredient
+  in:address:list <- next-ingredient
+  result:address:list <- new list:type
+  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, value:offset
-  reply result
+recipe first [
+  local-scope
+  in:address:list <- next-ingredient
+  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, next:offset
-  reply result
+recipe rest [
+  local-scope
+  in:address:list <- next-ingredient
+  result:address:list <- get *in, next:offset
+  reply result
 ]
 
-scenario list-handling [
+scenario list-handling [
   run [
-#?     $start-tracing #? 1
-    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
+    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