Function: woman-select
woman-select is a byte-compiled function defined in woman.el.gz.
Signature
(woman-select PREDICATE LIST)
Documentation
Select unique elements for which PREDICATE is true in LIST.
(Note that this function changes the value of LIST.)
Source Code
;; Defined in /usr/src/emacs/lisp/woman.el.gz
(defun woman-select (predicate list)
"Select unique elements for which PREDICATE is true in LIST.
\(Note that this function changes the value of LIST.)"
;; Intended to be fast by avoiding recursion and list copying.
(while (and list
(or
(member (car list) (cdr list))
(not (funcall predicate (car list)))))
(setq list (cdr list)))
(if list
(let ((newlist list) cdr_list)
(while (setq cdr_list (cdr list))
(if (and
(not (member (car cdr_list) (cdr cdr_list)))
(funcall predicate (car cdr_list)))
(setq list cdr_list)
(setcdr list (cdr cdr_list))))
newlist)))