Function: -zip
-zip is a byte-compiled function defined in dash.el.
Signature
(-zip &rest LISTS)
Documentation
Zip LISTS together.
Group the head of each list, followed by the second element of each list, and so on. The number of returned groupings is equal to the length of the shortest input list, and the number of items in each grouping is equal to the number of input LISTS.
If only two LISTS are provided as arguments, return the groupings as a list of dotted pairs. Otherwise, return the groupings as a list of proper lists.
Since the return value changes form depending on the number of
arguments, it is generally recommended to use -zip-lists
instead, or -zip-pair if a list of dotted pairs is desired.
See also: -unzip.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -zip (&rest lists)
"Zip LISTS together.
Group the head of each list, followed by the second element of
each list, and so on. The number of returned groupings is equal
to the length of the shortest input list, and the number of items
in each grouping is equal to the number of input LISTS.
If only two LISTS are provided as arguments, return the groupings
as a list of dotted pairs. Otherwise, return the groupings as a
list of proper lists.
Since the return value changes form depending on the number of
arguments, it is generally recommended to use `-zip-lists'
instead, or `-zip-pair' if a list of dotted pairs is desired.
See also: `-unzip'."
(declare (compiler-macro dash--zip-lists-or-pair)
(pure t) (side-effect-free t))
;; For backward compatibility, return a list of dotted pairs if two
;; arguments were provided.
(apply (if (dash--length= lists 2) #'-zip-pair #'-zip-lists) lists))