[plt-scheme] Can a module tell if it's being run interactively?

From: Noel Welsh (noelwelsh at gmail.com)
Date: 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.


Posted on the users mailing list.