diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-03-08 01:30:14 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-03-08 01:46:47 -0800 |
commit | 1ead356219bb2eb59487d1012f837bd07ec336f5 (patch) | |
tree | af15f390b81e4d6b3e0940c5756a0d7fd1060bb5 /023boolean.cc | |
parent | 27ba0937a3747684f299bb7a8b3cdd0fbb689db3 (diff) | |
download | mu-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 '023boolean.cc')
-rw-r--r-- | 023boolean.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/023boolean.cc b/023boolean.cc index 558421a5..fc501a79 100644 --- a/023boolean.cc +++ b/023boolean.cc @@ -33,7 +33,7 @@ case AND: { } :(scenario and) -recipe main [ +def main [ 1:boolean <- copy 1 2:boolean <- copy 0 3:boolean <- and 1:boolean, 2:boolean @@ -41,19 +41,19 @@ recipe main [ +mem: storing 0 in location 3 :(scenario and_2) -recipe main [ +def main [ 1:boolean <- and 1, 1 ] +mem: storing 1 in location 1 :(scenario and_multiple) -recipe main [ +def main [ 1:boolean <- and 1, 1, 0 ] +mem: storing 0 in location 1 :(scenario and_multiple_2) -recipe main [ +def main [ 1:boolean <- and 1, 1, 1 ] +mem: storing 1 in location 1 @@ -91,7 +91,7 @@ case OR: { } :(scenario or) -recipe main [ +def main [ 1:boolean <- copy 1 2:boolean <- copy 0 3:boolean <- or 1:boolean, 2:boolean @@ -99,19 +99,19 @@ recipe main [ +mem: storing 1 in location 3 :(scenario or_2) -recipe main [ +def main [ 1:boolean <- or 0, 0 ] +mem: storing 0 in location 1 :(scenario or_multiple) -recipe main [ +def main [ 1:boolean <- and 0, 0, 0 ] +mem: storing 0 in location 1 :(scenario or_multiple_2) -recipe main [ +def main [ 1:boolean <- or 0, 0, 1 ] +mem: storing 1 in location 1 @@ -151,14 +151,14 @@ case NOT: { } :(scenario not) -recipe main [ +def main [ 1:boolean <- copy 1 2:boolean <- not 1:boolean ] +mem: storing 0 in location 2 :(scenario not_multiple) -recipe main [ +def main [ 1:boolean, 2:boolean, 3:boolean <- not 1, 0, 1 ] +mem: storing 0 in location 1 |