about summary refs log tree commit diff stats
path: root/edit/009-sandbox-trace.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-08 01:30:14 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-03-08 01:46:47 -0800
commit1ead356219bb2eb59487d1012f837bd07ec336f5 (patch)
treeaf15f390b81e4d6b3e0940c5756a0d7fd1060bb5 /edit/009-sandbox-trace.mu
parent27ba0937a3747684f299bb7a8b3cdd0fbb689db3 (diff)
downloadmu-1ead356219bb2eb59487d1012f837bd07ec336f5.tar.gz
2735 - define recipes using 'def'
I'm dropping all mention of 'recipe' terminology from the Readme. That
way I hope to avoid further bike-shedding discussions while I very
slowly decide on the right terminology with my students.

I could be smarter in my error messages and use 'recipe' when code uses
it and 'function' otherwise. But what about other words like ingredient?
It would all add complexity that I'm not yet sure is worthwhile. But I
do want separate experiences for veteran programmers reading about Mu on
github and for people learning programming using Mu.
Diffstat (limited to 'edit/009-sandbox-trace.mu')
-rw-r--r--edit/009-sandbox-trace.mu10
1 files changed, 5 insertions, 5 deletions
diff --git a/edit/009-sandbox-trace.mu b/edit/009-sandbox-trace.mu
index d95350bc..0ac17120 100644
--- a/edit/009-sandbox-trace.mu
+++ b/edit/009-sandbox-trace.mu
@@ -81,7 +81,7 @@ scenario sandbox-shows-app-trace-and-result [
   1:address:shared:array:character <- new [ 
 recipe foo [
   stash [abc]
-  reply 4 
+  reply 4
 ]]
   # run it
   2:address:shared:array:character <- new [foo]
@@ -127,7 +127,7 @@ container sandbox-data [
 ]
 
 # replaced in a later layer
-recipe! update-sandbox sandbox:address:shared:sandbox-data, env:address:shared:programming-environment-data, idx:number -> sandbox:address:shared:sandbox-data, env:address:shared:programming-environment-data [
+def! update-sandbox sandbox:address:shared:sandbox-data, env:address:shared:programming-environment-data, idx:number -> sandbox:address:shared:sandbox-data, env:address:shared:programming-environment-data [
   local-scope
   load-ingredients
   data:address:shared:array:character <- get *sandbox, data:offset
@@ -166,7 +166,7 @@ after <global-touch> [
   }
 ]
 
-recipe find-click-in-sandbox-code env:address:shared:programming-environment-data, click-row:number -> sandbox:address:shared:sandbox-data [
+def find-click-in-sandbox-code env:address:shared:programming-environment-data, click-row:number -> sandbox:address:shared:sandbox-data [
   local-scope
   load-ingredients
   # assert click-row >= sandbox.starting-row-on-screen
@@ -192,9 +192,9 @@ recipe find-click-in-sandbox-code env:address:shared:programming-environment-dat
   click-on-sandbox-code?:boolean <- and click-above-response?, click-below-menu?
   {
     break-if click-on-sandbox-code?
-    reply 0/no-click-in-sandbox-output
+    return 0/no-click-in-sandbox-output
   }
-  reply sandbox
+  return sandbox
 ]
 
 # when rendering a sandbox, dump its trace before response/warning if display-trace? property is set