Make at-meta-level accept a list of actions.
This commit is contained in:
parent
732010a40a
commit
b8b74183b8
9
os2.rkt
9
os2.rkt
|
@ -49,8 +49,8 @@
|
||||||
(rename-out [make-kill kill])
|
(rename-out [make-kill kill])
|
||||||
(except-out (struct-out yield) yield)
|
(except-out (struct-out yield) yield)
|
||||||
(rename-out [yield-macro yield])
|
(rename-out [yield-macro yield])
|
||||||
|
(except-out (struct-out at-meta-level) at-meta-level)
|
||||||
(struct-out at-meta-level)
|
(rename-out [make-at-meta-level at-meta-level])
|
||||||
|
|
||||||
;; Aliases of structures themselves, because of shadowing of
|
;; Aliases of structures themselves, because of shadowing of
|
||||||
;; constructors/type-names.
|
;; constructors/type-names.
|
||||||
|
@ -311,6 +311,11 @@
|
||||||
(define (make-send-message body [role 'publisher]) (send-message body role))
|
(define (make-send-message body [role 'publisher]) (send-message body role))
|
||||||
(define (make-kill [pid #f] #:reason [reason #f]) (kill pid reason))
|
(define (make-kill [pid #f] #:reason [reason #f]) (kill pid reason))
|
||||||
|
|
||||||
|
(define (make-at-meta-level . actions)
|
||||||
|
(match actions
|
||||||
|
[(cons action '()) (at-meta-level action)]
|
||||||
|
[_ (map at-meta-level actions)]))
|
||||||
|
|
||||||
(define (send-feedback body) (make-send-message body 'subscriber))
|
(define (send-feedback body) (make-send-message body 'subscriber))
|
||||||
|
|
||||||
(define (make-spawn raw-spec [k #f]
|
(define (make-spawn raw-spec [k #f]
|
||||||
|
|
Loading…
Reference in New Issue