Function: cl--position
cl--position is a byte-compiled function defined in cl-seq.el.gz.
Signature
(cl--position ITEM SEQ START &optional END FROM-END)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-seq.el.gz
(defun cl--position (item seq start &optional end from-end)
(if (listp seq)
(let ((p (nthcdr start seq))
res)
(while (and p (or (null end) (< start end)) (or (null res) from-end))
(if (cl--check-test item (car p))
(setq res start))
(setq p (cdr p) start (1+ start)))
res)
(or end (setq end (length seq)))
(if from-end
(progn
(while (and (>= (setq end (1- end)) start)
(not (cl--check-test item (aref seq end)))))
(and (>= end start) end))
(while (and (< start end)
(not (cl--check-test item (aref seq start))))
(setq start (1+ start)))
(and (< start end) start))))