Function: -split-with
-split-with is a byte-compiled function defined in dash.el.
Signature
(-split-with PRED LIST)
Documentation
Split LIST into a prefix satisfying PRED, and the rest.
The first sublist is the prefix of LIST with successive elements satisfying PRED, and the second sublist is the remaining elements that do not. The result is like performing
((-take-while PRED LIST) (-drop-while PRED LIST))
but in no more than a single pass through LIST.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -split-with (pred list)
"Split LIST into a prefix satisfying PRED, and the rest.
The first sublist is the prefix of LIST with successive elements
satisfying PRED, and the second sublist is the remaining elements
that do not. The result is like performing
((-take-while PRED LIST) (-drop-while PRED LIST))
but in no more than a single pass through LIST."
(declare (important-return-value t))
(--split-with (funcall pred it) list))