Skip to content

Instantly share code, notes, and snippets.

@g000001
Created November 2, 2018 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g000001/affffe648c29a6454faef58ac0d52e35 to your computer and use it in GitHub Desktop.
Save g000001/affffe648c29a6454faef58ac0d52e35 to your computer and use it in GitHub Desktop.
concat
(let* ((a+b (make-string 10 :initial-element #\_))
(a (make-array 5 :displaced-to a+b :element-type 'character))
(b (make-array 5 :displaced-to a+b :displaced-index-offset 5 :element-type 'character)))
(setf (subseq a 0 2) "ab"
(subseq b 0 2) "cd")
(list a b a+b))
;=> ("ab___" "cd___" "ab___cd___")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment