AM Posted October 20, 2023 Posted October 20, 2023 kind of ... "position-insert" with OVERWRITE (defun position-insert-seq (&key alist insert item) (let ((pos (car (position-item item alist)))) (position-replace (gen-integer pos (+ pos (1- (length insert)))) insert alist))) (setf alist '(0 0 0 0 0 0 1 0 2 0 0 0 3 5 7)) (setf insert '(a b c d)) (position-insert-seq :alist '(0 0 0 0 0 0 1 0 2 0 0 0 3 5 7) :insert '(a b c d) :item 2) => (0 0 0 0 0 0 1 0 a b c d 3 5 7) erka and Stephane Boussuge 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.