about summary refs log tree commit diff stats
path: root/064list.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-05-27 00:52:28 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-05-27 00:52:28 -0700
commit898f03cc3b8a7261104730518a6cf1b6eae9f6f5 (patch)
tree2cde7e1d29aaaf8bc8465a7339a70ad55f6216d4 /064list.mu
parentaac76bca12c9fc60af15219d4d93d92699743ac1 (diff)
downloadmu-898f03cc3b8a7261104730518a6cf1b6eae9f6f5.tar.gz
3881 - allow students to turn sandboxes into recipes
Thanks Juan Crispin Hernandez for the suggestion.
Diffstat (limited to '064list.mu')
-rw-r--r--064list.mu15
1 files changed, 14 insertions, 1 deletions
diff --git a/064list.mu b/064list.mu
index c26b302a..47d47754 100644
--- a/064list.mu
+++ b/064list.mu
@@ -276,7 +276,7 @@ def reverse list:&:list:_elem temp:&:list:_elem/contained-in:result -> result:&:
 
 scenario reverse-list [
   local-scope
-  list:&:list:number <- push 1, 0
+  list:&:list:num <- push 1, 0
   list <- push 2, list
   list <- push 3, list
   run [
@@ -290,6 +290,19 @@ scenario reverse-list [
   ]
 ]
 
+scenario stash-list [
+  local-scope
+  list:&:list:num <- push 1, 0
+  list <- push 2, list
+  list <- push 3, list
+  run [
+    stash [list:], list
+  ]
+  trace-should-contain [
+    app: list: 3 -> 2 -> 1
+  ]
+]
+
 def to-text in:&:list:_elem -> result:text [
   local-scope
   load-ingredients