Inline "speaker" helper function
This commit is contained in:
parent
e2d2338137
commit
ddfa96d685
|
@ -34,11 +34,11 @@
|
||||||
|
|
||||||
(define (chat-roles me cout)
|
(define (chat-roles me cout)
|
||||||
(define (announce t did-what)
|
(define (announce t did-what)
|
||||||
(unless (equal? (speaker t) me)
|
(define who (first (topic-pattern t)))
|
||||||
|
(unless (equal? who me)
|
||||||
(at-meta-level
|
(at-meta-level
|
||||||
(cout (term->bytes
|
(cout (term->bytes
|
||||||
`(,(speaker t)
|
`(,who ,did-what))))))
|
||||||
,did-what))))))
|
|
||||||
(list
|
(list
|
||||||
(role (topic-publisher
|
(role (topic-publisher
|
||||||
`(,me says ,(wild))))
|
`(,me says ,(wild))))
|
||||||
|
@ -50,9 +50,6 @@
|
||||||
[msg (at-meta-level
|
[msg (at-meta-level
|
||||||
(cout (term->bytes msg)))])))
|
(cout (term->bytes msg)))])))
|
||||||
|
|
||||||
(define (speaker t)
|
|
||||||
(first (topic-pattern t)))
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(define (net-roles me
|
(define (net-roles me
|
||||||
cin cout
|
cin cout
|
||||||
|
|
Loading…
Reference in New Issue