~ chicken-core (chicken-5) 70b96058893bef1f4f3ca710f0dfca7c9c12c262


commit 70b96058893bef1f4f3ca710f0dfca7c9c12c262
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Wed Aug 1 13:48:27 2012 +0200
Commit:     Peter Bex <peter.bex@xs4all.nl>
CommitDate: Wed Aug 1 21:19:40 2012 +0200

    use named procedure for continuation wrapper for a slightly more useful printed representation
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

diff --git a/library.scm b/library.scm
index 67f859f9..ebf7ff45 100644
--- a/library.scm
+++ b/library.scm
@@ -1641,11 +1641,11 @@ EOF
   (let ((winds ##sys#dynamic-winds))
     (##sys#call-with-current-continuation
      (lambda (cont)
-       (proc
-	(lambda results
-	  (unless (eq? ##sys#dynamic-winds winds)
-	    (##sys#dynamic-unwind winds (fx- (length ##sys#dynamic-winds) (length winds))) )
-	  (apply cont results) ) ) ) ) ) )
+       (define (continuation . results)
+	 (unless (eq? ##sys#dynamic-winds winds)
+	   (##sys#dynamic-unwind winds (fx- (length ##sys#dynamic-winds) (length winds))) )
+	 (apply cont results) )
+       (proc continuation)))))
 
 (define call/cc call-with-current-continuation)
 
Trap