Skip to content

Instantly share code, notes, and snippets.

@frenchy64
Last active June 14, 2016 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frenchy64/8853fa71673b7b79bc5a035b89fe601c to your computer and use it in GitHub Desktop.
Save frenchy64/8853fa71673b7b79bc5a035b89fe601c to your computer and use it in GitHub Desktop.
#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