(define (call-with-output-file s p) (let ((outport (open-output-file s))) (if (eq? outport #f) #f (let ((res (p outport))) (close-output-port outport) res))))