publish call-with-{in,out}put-file
This commit is contained in:
parent
f02bac1d88
commit
fa0cde8d77
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue