Make at-meta-level accept a list of actions.

This commit is contained in:
Tony Garnock-Jones 2012-07-17 11:58:32 -04:00
parent 732010a40a
commit b8b74183b8
1 changed files with 7 additions and 2 deletions

View File

@ -49,8 +49,8 @@
(rename-out [make-kill kill])
(except-out (struct-out yield) yield)
(rename-out [yield-macro yield])
(struct-out at-meta-level)
(except-out (struct-out at-meta-level) at-meta-level)
(rename-out [make-at-meta-level at-meta-level])
;; Aliases of structures themselves, because of shadowing of
;; constructors/type-names.
@ -311,6 +311,11 @@
(define (make-send-message body [role 'publisher]) (send-message body role))
(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 (make-spawn raw-spec [k #f]