Flip order of actions to match paper draft
This commit is contained in:
parent
960ad02762
commit
e51276baa1
|
@ -37,12 +37,6 @@
|
|||
|
||||
(define (listen-to-user user them us)
|
||||
(list
|
||||
(add-endpoint 'speech-publisher
|
||||
(role 'publisher
|
||||
`(,user says ,?)
|
||||
'participant)
|
||||
(lambda (event)
|
||||
(lambda (state) (transition state '()))))
|
||||
(at-meta-level
|
||||
(add-endpoint 'tcp-receiver
|
||||
(role 'subscriber
|
||||
|
@ -56,7 +50,13 @@
|
|||
(lambda (state)
|
||||
(transition state (send-message `(,user says ,text) 'publisher)))]
|
||||
[_
|
||||
(lambda (state) (transition state '()))])))))
|
||||
(lambda (state) (transition state '()))])))
|
||||
(add-endpoint 'speech-publisher
|
||||
(role 'publisher
|
||||
`(,user says ,?)
|
||||
'participant)
|
||||
(lambda (event)
|
||||
(lambda (state) (transition state '()))))))
|
||||
|
||||
(define (speak-to-user user them us)
|
||||
(define (say fmt . args)
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define (listen-to-user user them us)
|
||||
(list
|
||||
(publish-on-topic `(,user says ,?))
|
||||
(at-meta-level
|
||||
(subscribe-to-topic (tcp-channel them us ?)
|
||||
(on-absence (quit))
|
||||
(on-message
|
||||
[(tcp-channel _ _ (? bytes? text))
|
||||
(send-message `(,user says ,text))])))))
|
||||
(send-message `(,user says ,text))])))
|
||||
(publish-on-topic `(,user says ,?))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define (speak-to-user user them us)
|
||||
|
|
Loading…
Reference in New Issue