19.2.6 Instantiating the stream  Now that the stream class has
been defined, and all the methods relevant to it have been set
up, we can create an instance of our user defined stream to test
it. The following function takes a filename and optionally a
stream direction as its arguments and makes an instance of
unicode-ls-stream . It ensures that the file-stream slot of the
stream contains a Common Lisp file-stream capable of reading
from or writing to a file given by the filename argument.
(defun open-unicode-ls-file (filename &key (direction :input))
(make-instance 'unicode-ls-stream :file-stream      (open
filename            :direction direction            :external-
format :unicode            :element-type 'simple-char)))  The
following macro uses open-unicode-ls-stream in a similar manner
to the Common Lisp macro with-open-file :  (defmacro with-open-
unicode-ls-file ((var filename
&key (direction :input))
&body body)   `(le