Inline "speaker" helper function

This commit is contained in:
Tony Garnock-Jones 2012-07-30 12:59:13 -04:00
parent e2d2338137
commit ddfa96d685
1 changed files with 3 additions and 6 deletions

View File

@ -34,11 +34,11 @@
(define (chat-roles me cout)
(define (announce t did-what)
(unless (equal? (speaker t) me)
(define who (first (topic-pattern t)))
(unless (equal? who me)
(at-meta-level
(cout (term->bytes
`(,(speaker t)
,did-what))))))
`(,who ,did-what))))))
(list
(role (topic-publisher
`(,me says ,(wild))))
@ -50,9 +50,6 @@
[msg (at-meta-level
(cout (term->bytes msg)))])))
(define (speaker t)
(first (topic-pattern t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (net-roles me
cin cout