I want to define a function that takes parameters &restand delegates them to another function.
(html "blah" "foo" baz) => "<html>blahfoobaz</html>"
I have not found a better way than this:
(defun html (&rest values)
(concatenate 'string
"<html>"
(reduce
(concatenate 'string a b))
values :initial-value "")
"</html>"))
But it looks a little dazzling to me, since line 4 does nothing more than concatenating the "values" of the parameter "amp; rest". I tried (concatenate 'string "<html>" (values-list values) "</html>"), but it does not work (SBCL). Can anyone give me some advice?
Yours faithfully
source
share