publish call-with-{in,out}put-file

This commit is contained in:
Yuichi Nishiwaki 2014-07-15 23:09:20 +09:00
parent f02bac1d88
commit fa0cde8d77
1 changed files with 12 additions and 3 deletions

View File

@ -1005,14 +1005,23 @@
(export call-with-port)
(define-library (scheme file)
(import (scheme base))
(define (call-with-input-file filename callback)
(call-with-port (open-input-file filename) callback))
(define (call-with-output-file filename callback)
(call-with-port (open-output-file filename) callback))
(export call-with-input-file
call-with-output-file))
;;; include syntax
(import (scheme read)
(scheme file))
(define (call-with-input-file filename callback)
(call-with-port (open-input-file filename) callback))
(define (read-many filename)
(call-with-input-file filename
(lambda (port)