(apply #'concatenate 'string
What is the maximum length of a list of strings (s) that Lispworks
(Windows) can
(apply #'concatenate 'string s) ?
I ask so that I can avoid a "stack overflow" or "out of memory" errors
with concatenation of long lists of strings, from
(mapcar #'string [list of chars])
obtained when reading text files.
In other words how can I write an efficient
(defun apply-concatenate-to-long-string (s)
(let ((maxlength #+MCL ? #+Lispworks ?))
(if (< (length s) maxlength)
(apply #'concatenate 'string s)
(do ((s s (rest s))
(r ""))
((endp s) r)
(setf r (concatenate 'string r (first s))))
)))
?
Thanks,
Sheldon