#lang racket (define (doit) (show-chars "MJ-statement.txt" "MJ-statement.output")) (define (show-chars filename1 filename2) (let ((ip (open-input-file filename1)) (op (open-output-file filename2))) (show-chars-help ip op) (close-input-port ip) (close-output-port op))) (define (show-chars-help ip op) (let ((char (read-char ip))) (if (not (equal? char eof)) (begin (print char op) (display " " op) (show-chars-help ip op)) (begin (print char op) (newline op))))) (define (show) (let ((ip (open-input-file "MJ-statement.txt")) (op (current-output-port))) (let ((char (read-char ip))) (if (not (equal? char eof)) (begin (print char op) (display " " op) (show-chars-help ip op)) (begin (print char op) (newline op))))))