From: Christopher Allan Webber Date: Mon, 23 Nov 2015 22:14:08 +0000 (-0600) Subject: Provide another indirection procedure with wrap-apply X-Git-Tag: v0.1.0~81 X-Git-Url: https://jxself.org/git/?p=8sync.git;a=commitdiff_plain;h=555743be477968b12562c5b6c92000ecfe9556f2 Provide another indirection procedure with wrap-apply --- diff --git a/eightsync/agenda.scm b/eightsync/agenda.scm index adbd0c6..1bfc0a3 100644 --- a/eightsync/agenda.scm +++ b/eightsync/agenda.scm @@ -61,7 +61,7 @@ port-request-port port-request-read port-request-write port-request-except - run-it wrap run run-at run-delay + run-it wrap wrap-apply run run-at run-delay %port-request %run %run-at %run-delay 8port-request 8run 8run-at 8run-delay @@ -382,6 +382,12 @@ Will produce (0 . 0) instead of a negative number, if needed." (lambda () body ...)) +(define-syntax-rule (wrap-apply body) + "Wrap possibly multi-value function in a procedure, applies all arguments" + (lambda args + (apply body args))) + + ;; @@: Do we really want `body ...' here? ;; what about just `body'? (define-syntax-rule (run body ...)