Function: -separate

-separate is a byte-compiled function defined in dash.el.

Signature

(-separate PRED LIST)

Documentation

Split LIST into two sublists based on whether items satisfy PRED.

The result is like performing

  ((-filter PRED LIST) (-remove PRED LIST))

but in a single pass through LIST.

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -separate (pred list)
  "Split LIST into two sublists based on whether items satisfy PRED.
The result is like performing

  ((-filter PRED LIST) (-remove PRED LIST))

but in a single pass through LIST."
  (declare (important-return-value t))
  (--separate (funcall pred it) list))