about summary refs log tree commit diff stats
path: root/063wait.cc
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 /063wait.cc
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 '063wait.cc')
-rw-r--r--063wait.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/063wait.cc b/063wait.cc
index c57f6b28..2d0e2d8d 100644
--- a/063wait.cc
+++ b/063wait.cc
@@ -4,14 +4,14 @@
 //: operate.
 
 :(scenario wait_for_location)
-recipe f1 [
+def f1 [
   1:number <- copy 0
   start-running f2
   wait-for-location 1:number
   # now wait for f2 to run and modify location 1 before using its value
   2:number <- copy 1:number
 ]
-recipe f2 [
+def f2 [
   1:number <- copy 34
 ]
 # if we got the synchronization wrong we'd be storing 0 in location 2
@@ -65,14 +65,14 @@ for (long long int i = 0; i < SIZE(Routines); ++i) {
 //: also allow waiting on a routine to stop running
 
 :(scenario wait_for_routine)
-recipe f1 [
+def f1 [
   1:number <- copy 0
   12:number/routine <- start-running f2
   wait-for-routine 12:number/routine
   # now wait for f2 to run and modify location 1 before using its value
   3:number <- copy 1:number
 ]
-recipe f2 [
+def f2 [
   1:number <- copy 34
 ]
 +schedule: f1