Coverage report: /home/ellis/.stash/quicklisp/dists/quicklisp/software/alexandria-20241012-git/alexandria-2/lists.lisp
Kind | Covered | All | % |
expression | 0 | 26 | 0.0 |
branch | 0 | 2 | 0.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
(in-package :alexandria-2)
3
(defun delete-from-plist* (plist &rest keys)
4
"Just like REMOVE-FROM-PLIST, but this version may destructively modify the
6
The second return value is an alist of the removed items, in unspecified order."
8
(declare (optimize speed))
9
(loop with head = plist
10
with tail = nil ; a nil tail means an empty result so far
12
for (key . rest) on plist by #'cddr
13
do (assert rest () "Expected a proper plist, got ~S" plist)
14
(if (member key keys :test #'eq)
15
;; skip over this pair
16
(let ((next (cdr rest)))
17
(push (cons key (car rest))
20
(setf (cdr tail) next)
24
finally (return (values head kept))))