about summary refs log tree commit diff stats
path: root/020run.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 /020run.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 '020run.cc')
-rw-r--r--020run.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/020run.cc b/020run.cc
index 32440ea4..3b9cd4d3 100644
--- a/020run.cc
+++ b/020run.cc
@@ -10,14 +10,14 @@
 //: another. Later layers will add more primitives.
 
 :(scenario copy_literal)
-recipe main [
+def main [
   1:number <- copy 23
 ]
 +run: 1:number <- copy 23
 +mem: storing 23 in location 1
 
 :(scenario copy)
-recipe main [
+def main [
   1:number <- copy 23
   2:number <- copy 1:number
 ]
@@ -26,7 +26,7 @@ recipe main [
 +mem: storing 23 in location 2
 
 :(scenario copy_multiple)
-recipe main [
+def main [
   1:number, 2:number <- copy 23, 24
 ]
 +mem: storing 23 in location 1
@@ -330,7 +330,7 @@ void run(string form) {
 }
 
 :(scenario run_label)
-recipe main [
+def main [
   +foo
   1:number <- copy 23
   2:number <- copy 1:number
@@ -340,14 +340,14 @@ recipe main [
 -run: +foo
 
 :(scenario run_dummy)
-recipe main [
+def main [
   _ <- copy 0
 ]
 +run: _ <- copy 0
 
 :(scenario write_to_0_disallowed)
 % Hide_errors = true;
-recipe main [
+def main [
   0:number <- copy 34
 ]
 -mem: storing 34 in location 0
@@ -356,25 +356,25 @@ recipe main [
 //: to put spaces around the '<-'.
 
 :(scenario comma_without_space)
-recipe main [
+def main [
   1:number, 2:number <- copy 2,2
 ]
 +mem: storing 2 in location 1
 
 :(scenario space_without_comma)
-recipe main [
+def main [
   1:number, 2:number <- copy 2 2
 ]
 +mem: storing 2 in location 1
 
 :(scenario comma_before_space)
-recipe main [
+def main [
   1:number, 2:number <- copy 2, 2
 ]
 +mem: storing 2 in location 1
 
 :(scenario comma_after_space)
-recipe main [
+def main [
   1:number, 2:number <- copy 2 ,2
 ]
 +mem: storing 2 in location 1