Last active
June 14, 2016 00:39
-
-
Save frenchy64/8853fa71673b7b79bc5a035b89fe601c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (emit s) s) | |
(define (process-file in out) | |
(with-input-from-file in | |
(lambda () | |
(with-output-to-file out | |
#:exists 'replace | |
(lambda () | |
(let loop ([sexp (read)]) | |
(if (eof-object? sexp) | |
#f | |
(begin | |
(display (emit sexp)) | |
(loop (read)))))))))) | |
(process-file "in.isw" "out.scm") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment