Function: -zip-lists-fill

-zip-lists-fill is a byte-compiled function defined in dash.el.

Signature

(-zip-lists-fill FILL-VALUE &rest LISTS)

Documentation

Zip LISTS together, padding shorter lists with FILL-VALUE.

This is like -zip-lists (which see), except it retains all elements at positions beyond the end of the shortest list. The number of returned groupings is equal to the length of the longest input list, and the length of each grouping is equal to the number of input LISTS.

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -zip-lists-fill (fill-value &rest lists)
  "Zip LISTS together, padding shorter lists with FILL-VALUE.
This is like `-zip-lists' (which see), except it retains all
elements at positions beyond the end of the shortest list.  The
number of returned groupings is equal to the length of the
longest input list, and the length of each grouping is equal to
the number of input LISTS."
  (declare (pure t) (side-effect-free t))
  (when lists
    (let (results)
      (while (--some it lists)
        (push (--map (if it (car it) fill-value) lists) results)
        (setq lists (mapcar #'cdr lists)))
      (nreverse results))))