projects
/
8sync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: Remove the indentation after newline structure.
[8sync.git]
/
demos
/
actors
/
botherbotherbother.scm
diff --git
a/demos/actors/botherbotherbother.scm
b/demos/actors/botherbotherbother.scm
index 5a43a8bd9e65a10e9fb4821dbd6acd4b1d29722e..8daed935e358e0167e3d3954032701a0f86845ed 100755
(executable)
--- a/
demos/actors/botherbotherbother.scm
+++ b/
demos/actors/botherbotherbother.scm
@@
-81,6
+81,7
@@
;; Oof! Those kids!
(display (string-append (random-choice complaints)))
;; Oof! Those kids!
(display (string-append (random-choice complaints)))
+ (newline)
;; More than one student is bothering us, lose our temper
(if (> (hash-count (const #t) whos-bothering)
;; More than one student is bothering us, lose our temper
(if (> (hash-count (const #t) whos-bothering)
@@
-115,20
+116,21
@@
(define (main . args)
(define agenda (make-agenda))
(define hive (make-hive))
(define (main . args)
(define agenda (make-agenda))
(define hive (make-hive))
- (define professor (hive-create-actor
hive <professor>
))
+ (define professor (hive-create-actor
* hive <professor> "prof"
))
(define namegen (student-name-generator))
(define students
(map
(lambda _
(define namegen (student-name-generator))
(define students
(map
(lambda _
- (hive-create-actor* hive <student>
- (#:name (namegen))))
+ (let ((name (namegen)))
+ (hive-create-actor* hive <student> name
+ #:name name)))
(iota num-students)))
;; Bootstrap each student into bothering-professor mode.
(define start-bothering-tasks
(map
(lambda (student)
(iota num-students)))
;; Bootstrap each student into bothering-professor mode.
(define start-bothering-tasks
(map
(lambda (student)
- (
hive-
bootstrap-message hive student 'bother-professor
+ (bootstrap-message hive student 'bother-professor
#:target professor))
students))
#:target professor))
students))