Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,5 +1,3 @@
(defun repeat-string (n string)
(with-output-to-string (stream)
(loop repeat n do (write-string string stream))))
(princ (repeat-string 5 "hi"))

View file

@ -1 +1,9 @@
(make-string 5 :initial-element #\X)
(defun repeat-string (n string
&aux
(len (length string))
(result (make-string (* n len)
:element-type (array-element-type string))))
(loop repeat n
for i from 0 by len
do (setf (subseq result i (+ i len)) string))
result)

View file

@ -0,0 +1 @@
(princ (repeat-string 5 "hi"))

View file

@ -0,0 +1 @@
(make-string 5 :initial-element #\X)