about summary refs log tree commit diff stats
path: root/channel.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-12-12 18:07:30 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-12-12 18:07:30 -0800
commit0ca35d02df358b73f4e2c6c665226d2d56c61fdd (patch)
treeca13b1a2560b72ebccbde317cc91e52da2d4b7d2 /channel.mu
parentac32d9d197c6fb45849b13e5affd0e5999c5cd09 (diff)
downloadmu-0ca35d02df358b73f4e2c6c665226d2d56c61fdd.tar.gz
403 - 'function' is more clear than 'def'
Diffstat (limited to 'channel.mu')
-rw-r--r--channel.mu6
1 files changed, 3 insertions, 3 deletions
diff --git a/channel.mu b/channel.mu
index 5eb8849e..fa6d89c3 100644
--- a/channel.mu
+++ b/channel.mu
@@ -1,4 +1,4 @@
-(def producer [
+(function producer [
   ; produce numbers 1 to 5 on a channel
   ((default-scope scope-address) <- new (scope literal) (30 literal))
   ((chan channel-address) <- next-input)
@@ -22,7 +22,7 @@
   }
 ])
 
-(def consumer [
+(function consumer [
   ; consume and print integers from a channel
   ((default-scope scope-address) <- new (scope literal) (30 literal))
   ((chan channel-address) <- next-input)
@@ -39,7 +39,7 @@
   }
 ])
 
-(def main [
+(function main [
   ((chan channel-address) <- new-channel (3 literal))
   ; create two background 'routines' that communicate by a channel
   (fork (consumer fn) (chan channel-address))