[plt-scheme] Can a module tell if it's being run interactively?
Noel Welsh
noelwelsh at gmail.com
Wed Apr 16 01:58:42 EDT 2008
On Wed, Apr 16, 2008 at 12:12 AM, Richard Cobbe <cobbe at ccs.neu.edu> wrote:
>
> #!/path/to/mzscheme
> #lang mzscheme
>
> (define (run)
> (pretty-print (munge-input (read))))
>
> (define munge-input ...)
>
> (run)
>
I would split this into two modules. One defines munge-input, the
other provides the script wrapper around it. Now you can test
munge-input in the usual way.
N.
More information about the plt-scheme
mailing list