Commit 241bb12d authored by Juergen Nickelsen's avatar Juergen Nickelsen

remove, delete

parent 0647757d
......@@ -649,3 +649,17 @@ list as appropriate."
(car alist)
(sassq item (cdr alist) func))))
(defun remove (item l &optional test)
"delete the occurrences of ITEM from list L and return the result"
(setq test (or test #'eq))
(if (null l)
nil
(if (test item (car l))
(remove item (cdr l) test)
(cons (car l) (remove item (cdr l) test)))))
(defun delete (item l &optional test)
"delete the occurrences of ITEM from list L and return the result, may modify"
;; but does not, currently
(remove item l test))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment