Optimized concat.

Pascal J. Bourguignon [2018-12-02 11:18]
Optimized concat.
Filename
driver/driver.lisp
diff --git a/driver/driver.lisp b/driver/driver.lisp
index 364710c..4bd7f03 100644
--- a/driver/driver.lisp
+++ b/driver/driver.lisp
@@ -1049,7 +1049,10 @@ that are accessible by the user."
                                              :name nil :type nil :version nil)
                               rootpath nil)))

-(defun concat (&rest items) (apply (function concatenate) 'string items))
+(defun concat (&rest items)
+  (with-output-to-string (*standard-output*)
+    (dolist (item items)
+      (write-string item))))

 (defun mapconcat (function sequence separator)
   (etypecase sequence
ViewGit