Skip to content

Commit

Permalink
Add type declaration to reduce compiler uncertainty
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Bird committed Feb 9, 2012
1 parent cd2a5d8 commit c726fc8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions collectors.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,14 @@ This form returns the result of that formatter"
&body body)
"A macro that creates a string builder with name in scope during the
duration of the env"
(alexandria:with-unique-names (it)
(alexandria:with-unique-names (it items)
`(let ((,it (make-string-builder
:delimiter ,delimiter
:ignore-empty-strings-and-nil ,ignore-empty-strings-and-nil
:stream ,stream)))
(flet ((,name (&rest items) (apply ,it items)))
(declare (type function ,it))
(flet ((,name (&rest ,items)
(declare (dynamic-extent ,items)) (apply ,it ,items)))
,@body))))

(defmacro with-string-builder-output ((name &key delimiter (ignore-empty-strings-and-nil t)
Expand Down

0 comments on commit c726fc8

Please sign in to comment.