3.5 Input and Output
Prints the given v
to the current output, or stdout if not otherwise
specified, followed by a newline. (print & v)
outputs without a
newline, while (print lit v)
outputs as a literal form that can be
directly read back by (input stx ....)
as code. A bare (print)
merely prints a newline to the current output.
A shortened macro for print.
Reads a line of input from the current input, or stdin if not otherwise
specified, and returns the value read as a string. (input stx ....)
instead reads a value using the standard reader, thus providing syntax which can
be evaluated with run
. If additionally provided with a string, this
will be output as a prompt to the current output.
Evaluates the body, with input/ouptut redirected to the given io-port. Only the
port is supported at this time.
Opens the file name as the new target for input or output, depending on
the mode provided. mode is a symbol, of one of the following:
Opens file as the current output port. Will fail if
file already exists.
Opens file as the current output port, rewriting its
contents if the file exists.
Opens file as the current input port.
A value (distinct from all other values) that represents an end-of-file.
(eof? v) → boolean?
| v : any?|
is an eof