chickadee » tabular » reader*


Constructs a reader generator procedure for the given input format specification and returns the reader procedure. The reader procedure is of the form LAMBDA () -> RECORD. It reads one record from the given input stream and by default returns the record as a list of values. If optional argument RETURN-NAMES is true, the record will be returned as an alist where the keys are column names (if COLUMN-NAMES is provided) or indices, and the values are the column values.

  • Argument INPUT is a string or a port.
  • Argument DELIMITER specifies the delimiter character (default is #\,). If its value is #f, then COLUMNN-WIDTHS must be specified.
  • Argument EOL specifies the end-of-line string (default is "\n").
  • Argument COMMENT-CHAR specifies a comment character: the reader will skip all lines that start with this character (default: none).
  • Argument NA specifies a default value to be supplied when a given field is empty (default: none).
  • Argument COLUMN-NAMES specifies column names which will be used if RETURN-NAMES is true (default: none).
  • Argument COLUMN-WIDTHS specifies column widths which will be used if DELIMITER is not specified (default: none).
  • Argument RETURN-NAMES specifies that each returned record will have the form of an alist with column name and value pairs. If COLUMN-NAMES is not provided, the column index will be used as key instead.