X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=8sync%2Fsystems%2Factors.scm;fp=8sync%2Fsystems%2Factors.scm;h=c33240f309cc181dcf030b905a43b989e4cec186;hp=270b25f452909e5a000780bd7de5e968d47d63d2;hb=e8a99d0a22f93676617c1d7d0f45cb675ed852ee;hpb=d3202269c645127c176cad41185fa0f95be34d89 diff --git a/8sync/systems/actors.scm b/8sync/systems/actors.scm index 270b25f..c33240f 100644 --- a/8sync/systems/actors.scm +++ b/8sync/systems/actors.scm @@ -369,6 +369,9 @@ Which is like doing manually: ((_ (action-name handler)) (cons (quote action-name) handler)))) +(define-syntax-rule (build-actions action-item ...) + (list (%expand-action-item action-item) ...)) + (define-syntax make-action-dispatch (syntax-rules () "Expand a list of action names and actions into an alist @@ -390,8 +393,7 @@ more compact following syntax: ((party actor message) (display \"Life of the party!\")))" ((make-action-dispatch action-item ...) - (simple-dispatcher - (list (%expand-action-item action-item) ...))))) + (simple-dispatcher (build-actions action-item ...))))) (define-syntax-rule (define-simple-actor class actions ...) (define-class class ()