Function: -pad

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

Signature

(-pad FILL-VALUE &rest LISTS)

Documentation

Pad each of LISTS with FILL-VALUE until they all have equal lengths.

Ensure all LISTS are as long as the longest one by repeatedly appending FILL-VALUE to the shorter lists, and return the resulting LISTS.

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -pad (fill-value &rest lists)
  "Pad each of LISTS with FILL-VALUE until they all have equal lengths.

Ensure all LISTS are as long as the longest one by repeatedly
appending FILL-VALUE to the shorter lists, and return the
resulting LISTS."
  (declare (pure t) (side-effect-free t))
  (let* ((lens (mapcar #'length lists))
         (maxlen (apply #'max 0 lens)))
    (--map (append it (make-list (- maxlen (pop lens)) fill-value)) lists)))