diff options
author | David Thompson <dthompson2@worcester.edu> | 2013-11-08 19:19:41 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2013-11-08 19:19:41 -0500 |
commit | 12f0605e2522f5221004bb3d7ccc809787ee8dcd (patch) | |
tree | 65dd94abc4c5cfc723b93ae650e9e62d0707a99c /2d | |
parent | 98dd19d129e74e146a71fe2caa1c48c1ba232e5c (diff) |
Fix codefine*.
Thank you to shanecelis and mark_weaver.
Diffstat (limited to '2d')
-rw-r--r-- | 2d/coroutine.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/2d/coroutine.scm b/2d/coroutine.scm index 3e4d256..36071e2 100644 --- a/2d/coroutine.scm +++ b/2d/coroutine.scm @@ -61,15 +61,15 @@ coroutine." (lambda () (name ...))))) ;; emacs: (put 'codefine* 'scheme-indent-function 1) -(define-syntax-rule (codefine* (name ...) . body) - "Syntactic sugar for defining a procedure with optional and -keyword arguments that is run as a coroutine." - (define* (name ...) +(define-syntax-rule (codefine* (name . formals) . body) + "Syntactic sugar for defining a procedure that is run as a +coroutine." + (define (name . args) ;; Create an inner procedure with the same signature so that a ;; recursive procedure call does not create a new prompt. - (define* (name ...) . body) + (define* (name . formals) . body) (coroutine - (lambda () (name ...))))) + (lambda () (apply name args))))) (define (yield callback) "Yield continuation to a CALLBACK procedure." |