about summary refs log tree commit diff stats
path: root/024jump.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 /024jump.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 '024jump.cc')
-rw-r--r--024jump.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/024jump.cc b/024jump.cc
index 8b0a012a..c11a6464 100644
--- a/024jump.cc
+++ b/024jump.cc
@@ -1,7 +1,7 @@
 //: Jump primitives
 
 :(scenario jump_can_skip_instructions)
-recipe main [
+def main [
   jump 1:offset
   1:number <- copy 1
 ]
@@ -38,7 +38,7 @@ case JUMP: {
 put(Type_ordinal, "offset", 0);
 
 :(scenario jump_backward)
-recipe main [
+def main [
   jump 1:offset  # 0 -+
   jump 3:offset  #    |   +-+ 1
                  #   \/  /\ |
@@ -81,7 +81,7 @@ case JUMP_IF: {
 }
 
 :(scenario jump_if)
-recipe main [
+def main [
   jump-if 999, 1:offset
   123:number <- copy 1
 ]
@@ -91,7 +91,7 @@ recipe main [
 -mem: storing 1 in location 123
 
 :(scenario jump_if_fallthrough)
-recipe main [
+def main [
   jump-if 0, 1:offset
   123:number <- copy 1
 ]
@@ -133,7 +133,7 @@ case JUMP_UNLESS: {
 }
 
 :(scenario jump_unless)
-recipe main [
+def main [
   jump-unless 0, 1:offset
   123:number <- copy 1
 ]
@@ -143,7 +143,7 @@ recipe main [
 -mem: storing 1 in location 123
 
 :(scenario jump_unless_fallthrough)
-recipe main [
+def main [
   jump-unless 999, 1:offset
   123:number <- copy 1
 ]