I want to define a function that accepts &rest
parameters and delegates them to another function.
(html "blah" "foo" baz) => "<html>blahfoobaz</html>"
I did not find a better way than this one:
(defun html (&rest values)
(concatenate 'string
"<html>"
(reduce #'(lambda (a b)
(concatenate 'string a b))
values :initial-value "")
"</html>"))
But this looks somewhat glumbsy to me, since line 4 does no more than concatenating the &rest parameter "values". I tried (concatenate 'string "<html>" (values-list values) "</html>")
but this does not seem to work (SBCL). Could someone give me an advice?
Kind regards