Skip to content

Commit

Permalink
Stream param has been added to print-table function
Browse files Browse the repository at this point in the history
  • Loading branch information
poiuj committed Jun 30, 2013
1 parent 3851d57 commit d07e137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text-table.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

(defconstant extra-ws 2)

(defun print-table (tbl &key (header-delimiter #\=) (column-delimiter #\|) (row-delimiter #\Newline))
(defun print-table (tbl &key (header-delimiter #\=) (column-delimiter #\|) (row-delimiter #\Newline) (stream *standard-output*))
"prints table 'tbl' with delimiter 'delimiter' to the standard output"
(macrolet ((write-no-escape (object)
`(write ,object :escape nil)))
`(write ,object :stream stream :escape nil)))

(flet ((%print-row (row lengths)
(loop
Expand Down

0 comments on commit d07e137

Please sign in to comment.