From 1ead356219bb2eb59487d1012f837bd07ec336f5 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 8 Mar 2016 01:30:14 -0800 Subject: 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. --- channel.mu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'channel.mu') diff --git a/channel.mu b/channel.mu index 54486957..6e948da0 100644 --- a/channel.mu +++ b/channel.mu @@ -1,6 +1,6 @@ # example program: communicating between routines using channels -recipe producer chan:address:shared:channel -> chan:address:shared:channel [ +def producer chan:address:shared:channel -> chan:address:shared:channel [ # produce characters 1 to 5 on a channel local-scope load-ingredients @@ -18,7 +18,7 @@ recipe producer chan:address:shared:channel -> chan:address:shared:channel [ } ] -recipe consumer chan:address:shared:channel -> chan:address:shared:channel [ +def consumer chan:address:shared:channel -> chan:address:shared:channel [ # consume and print integers from a channel local-scope load-ingredients @@ -32,7 +32,7 @@ recipe consumer chan:address:shared:channel -> chan:address:shared:channel [ } ] -recipe main [ +def main [ local-scope chan:address:shared:channel <- new-channel 3 # create two background 'routines' that communicate by a channel -- cgit 1.4.1-2-gfad0