Function | Package: excl | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Minimal update since the initial 10.1 release. 10.0 version

## make-function-input-stream

Arguments: function &rest args

make-function-input-stream creates and returns an input stream that is populated by function. function is invoked in a new Lisp process with one or more arguments (function will be passed the same number of arguments as make-function-input-stream was passed). The first argument is an output stream to which function should write. The data written by function will be available for reading on the input stream which make-function-input-stream returns. The remaining arguments passed to function are the remaining arguments that were passed to make-function-input-stream. When function terminates (either normally or abnormally), the output stream is closed.

See also with-function-input-stream.

### Example

    cl-user(34): (defun filler (writeto count)
                    (dotimes (n count)
                       (write-byte n writeto))
                    (close writeto))
    filler
    cl-user(35): (setq instream (make-function-input-stream #'filler 3))
    #<pipe-stream  @ #x10005170752>
    cl-user(36): (read-byte instream nil instream)
    0
    cl-user(37): (read-byte instream nil instream)
    1
    cl-user(38): (read-byte instream nil instream)
    2
    cl-user(39): (read-byte instream nil instream)
    #<pipe-stream  @ #x10005170752>  ;; EOF reached
    cl-user(40): (close instream)
    t
    cl-user(41):

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Minimal update since the initial 10.1 release. 10.0 version