Skip to content

Commit

Permalink
replaces a cond with an if
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbysmith007 committed Feb 1, 2012
1 parent fc9061d commit cd2a5d8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions collectors.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,11 @@ binds *print-pretty* to nil
"~{~?~}")))
(with-collector (value)
(lambda (&rest args)
(cond
((null args)
(let ((*print-pretty* pretty))
(format stream format-string (value))))
(args
(destructuring-bind (format-string &rest args) args
(value format-string args))))
))))
(if (null args)
(let ((*print-pretty* pretty))
(format stream format-string (value)))
(destructuring-bind (format-string &rest args) args
(value format-string args)))))))

(defmacro with-formatter ((name &key delimiter stream pretty) &body body)
"A macro makes a function with name for body that is a string formatter
Expand Down

0 comments on commit cd2a5d8

Please sign in to comment.