Function: -inits
-inits is a byte-compiled function defined in dash.el.
Signature
(-inits LIST)
Documentation
Return all prefixes of LIST.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -inits (list)
"Return all prefixes of LIST."
(declare (pure t) (side-effect-free t))
(let ((res (list list)))
(setq list (reverse list))
(while list
(push (reverse (!cdr list)) res))
res))