about summary refs log tree commit diff stats
path: root/029tools.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 /029tools.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 '029tools.cc')
-rw-r--r--029tools.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/029tools.cc b/029tools.cc
index 399bf6b5..50d85e55 100644
--- a/029tools.cc
+++ b/029tools.cc
@@ -1,7 +1,7 @@
 //: Allow mu programs to log facts just like we've been doing in C++ so far.
 
 :(scenario trace)
-recipe main [
+def main [
   trace 1, [foo], [this is a trace in mu]
 ]
 +foo: this is a trace in mu
@@ -59,19 +59,19 @@ case STASH: {
 }
 
 :(scenario stash_literal_string)
-recipe main [
+def main [
   stash [foo]
 ]
 +app: foo
 
 :(scenario stash_literal_number)
-recipe main [
+def main [
   stash [foo:], 4
 ]
 +app: foo: 4
 
 :(scenario stash_number)
-recipe main [
+def main [
   1:number <- copy 34
   stash [foo:], 1:number
 ]
@@ -187,7 +187,7 @@ case _SAVE_TRACE: {
 
 :(scenario assert)
 % Hide_errors = true;  // '%' lines insert arbitrary C code into tests before calling 'run' with the lines below. Must be immediately after :(scenario) line.
-recipe main [
+def main [
   assert 0, [this is an assert in mu]
 ]
 +error: this is an assert in mu