This commit is contained in:
Yuichi Nishiwaki 2014-09-10 03:11:45 +09:00
parent bd68a94af5
commit a0ab746fc8
1 changed files with 3 additions and 4 deletions

View File

@ -536,10 +536,9 @@
;; 6.13. Input and output
(define (call-with-port port proc)
(dynamic-wind
(lambda () #f)
(lambda () (proc port))
(lambda () (close-port port))))
(let ((value (proc port)))
(close-port port)
value))
(export current-input-port
current-output-port