publish call-with-{in,out}put-file
This commit is contained in:
parent
f02bac1d88
commit
fa0cde8d77
|
@ -1005,14 +1005,23 @@
|
||||||
|
|
||||||
(export call-with-port)
|
(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
|
;;; include syntax
|
||||||
|
|
||||||
(import (scheme read)
|
(import (scheme read)
|
||||||
(scheme file))
|
(scheme file))
|
||||||
|
|
||||||
(define (call-with-input-file filename callback)
|
|
||||||
(call-with-port (open-input-file filename) callback))
|
|
||||||
|
|
||||||
(define (read-many filename)
|
(define (read-many filename)
|
||||||
(call-with-input-file filename
|
(call-with-input-file filename
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
|
|
Loading…
Reference in New Issue