diff --git a/piclib/built-in.scm b/piclib/built-in.scm index 36e2ab29..8221653e 100644 --- a/piclib/built-in.scm +++ b/piclib/built-in.scm @@ -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)