Skip to content

Commit

Permalink
cln: PR comments from 2022-06-07
Browse files Browse the repository at this point in the history
  • Loading branch information
hrehfeld committed Jun 9, 2022
1 parent ab87376 commit 093f1ad
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dash.el
Expand Up @@ -1595,16 +1595,14 @@ elements of LIST. Keys are compared by `equal'."
(nreverse result))))

(defun -interleave-all (&rest lists)
"Return a new list of the first item in each of `lists', then the
second etc. Continue interleaving all elements of all lists by
skipping the non-existing elements of short lists."
"Return a new list containing an element of each of `LISTS' in turn, includes all elements. "
(declare (pure t) (side-effect-free t))
(when lists
(let (result)
(while (--any? (consp it) lists)
(while (-none? 'null lists)
(while (--some (consp it) lists)
(while (--every lists)
(--each lists (!cons (car it) result))
(setq lists (-map 'cdr lists)))
(setq lists (-map #'cdr lists)))
(setq lists (-filter #'consp lists)))
(nreverse result))))

Expand Down

0 comments on commit 093f1ad

Please sign in to comment.