Function: dash--lex-perms
dash--lex-perms is a byte-compiled function defined in dash.el.
Signature
(dash--lex-perms VEC &optional ORIGINAL)
Documentation
Return a list of permutations of VEC in lexicographic order.
Specifically, return only the successors of VEC in lexicographic order. Each returned permutation is a list. VEC should comprise one or more numbers, and may be destructively modified.
If ORIGINAL is a vector, then VEC is interpreted as a set of indices into ORIGINAL. In this case, the indices are permuted, and the resulting index permutations are used to dereference elements of ORIGINAL.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun dash--lex-perms (vec &optional original)
"Return a list of permutations of VEC in lexicographic order.
Specifically, return only the successors of VEC in lexicographic
order. Each returned permutation is a list. VEC should comprise
one or more numbers, and may be destructively modified.
If ORIGINAL is a vector, then VEC is interpreted as a set of
indices into ORIGINAL. In this case, the indices are permuted,
and the resulting index permutations are used to dereference
elements of ORIGINAL."
(let ((len (length vec)) perms)
(while vec
(push (if original
(--map (aref original it) vec)
(append vec ()))
perms)
(setq vec (dash--next-lex-perm vec len)))
(nreverse perms)))