Function: magit--separate

magit--separate is a byte-compiled function defined in magit-base.el.

Signature

(magit--separate PRED LIST)

Documentation

Separate elements of LIST that do and don't satisfy PRED.

Return a list of two lists; the first containing the elements that do satisfy PRED and the second containing the elements that don't.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-base.el
;;; Missing from Emacs

(defun magit--separate (pred list)
  "Separate elements of LIST that do and don't satisfy PRED.
Return a list of two lists; the first containing the elements that
do satisfy PRED and the second containing the elements that don't."
  (let (y n)
    (dolist (elt list)
      (push elt (if (funcall pred elt) y n)))
    (list (nreverse y)
          (nreverse n))))