From 898f03cc3b8a7261104730518a6cf1b6eae9f6f5 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 27 May 2017 00:52:28 -0700 Subject: 3881 - allow students to turn sandboxes into recipes Thanks Juan Crispin Hernandez for the suggestion. --- 064list.mu | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to '064list.mu') 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 -- cgit 1.4.1-2-gfad0