Plaster

common-lisp
(let ((list (list 1 2 3 'x 4 5 6 7 'x 8 9)) (delimiter 'x)) (loop for (head tail) = (loop for sublist on list until (eql (car sublist) delimiter) collect (car sublist) into first-part finally (return (list first-part (cdr sublist)))) do (setf list tail) collect head until (endp list)))

Annotations