library(codesio)
implements a stream that can return a list of
all characters written to it. The source code for this library is
located in library/codesio.pl and library/codesio.c and
can serve as a useful sample for user defined streams both for input
and output. That code also illustrates other important features of
user defined streams, for instance ensuring that all the streams has
been closed when the foreign resource is unloaded.