Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
1
Task/Repeat-a-string/Common-Lisp/repeat-a-string-3.lisp
Normal file
1
Task/Repeat-a-string/Common-Lisp/repeat-a-string-3.lisp
Normal file
|
|
@ -0,0 +1 @@
|
|||
(princ (repeat-string 5 "hi"))
|
||||
1
Task/Repeat-a-string/Common-Lisp/repeat-a-string-4.lisp
Normal file
1
Task/Repeat-a-string/Common-Lisp/repeat-a-string-4.lisp
Normal file
|
|
@ -0,0 +1 @@
|
|||
(make-string 5 :initial-element #\X)
|
||||
Loading…
Add table
Add a link
Reference in a new issue