I needed a destructive append to a JS array, so I wrote this version of NCONC for PS. It's primitive, but does what I need.<br><br>(defun nconc (arr &rest arrs)<br> (when (and arr (> (length arr) 0))<br> (loop :for other :in arrs :when (and other (> (length other) 0)) :do<br>
((@ arr :splice :apply) arr<br> (append (list (length arr) (length other)) other))))<br> arr)<br><br>I suppose this would naturally go in some kind of runtime library for PS. (We have quite a few utility functions that might belong there, in fact.) But I don't think there is one anymore. Should there be?<br>
<br>Daniel<br>