[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash bd85b7c 302/426: Make -zip support infinite (circu
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash bd85b7c 302/426: Make -zip support infinite (circular) lists |
Date: |
Tue, 04 Aug 2015 19:38:27 +0000 |
branch: externals/dash
commit bd85b7cd8a22c6abf3e03cbdd8107cd4e9b0b40a
Author: Steve Lamb <address@hidden>
Commit: Steve Lamb <address@hidden>
Make -zip support infinite (circular) lists
---
dash.el | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/dash.el b/dash.el
index 15d1d24..ef09873 100644
--- a/dash.el
+++ b/dash.el
@@ -803,14 +803,10 @@ groupings are equal to the length of the shortest input
list.
If two lists are provided as arguments, return the groupings as a list
of cons cells. Otherwise, return the groupings as a list of lists. "
- (let* ((n (-min (-map 'length lists)))
- (level-lists (-map (-partial '-take n) lists))
- results)
- (while (> n 0)
- (let ((split-lists (-map (-partial '-split-at 1) level-lists)))
- (setq results (cons (-map 'caar split-lists) results))
- (setq level-lists (-map 'cadr split-lists))
- (setq n (1- n))))
+ (let (results)
+ (while (-none? 'null lists)
+ (setq results (cons (mapcar 'car lists) results))
+ (setq lists (mapcar 'cdr lists)))
(setq results (nreverse results))
(if (= (length lists) 2)
; to support backward compatability, return
- [elpa] externals/dash cd137e0 310/426: `-slice` should not fill the returned list with nils if to > length, (continued)
- [elpa] externals/dash cd137e0 310/426: `-slice` should not fill the returned list with nils if to > length, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5219ac0 422/426: [-let] Eliminate useless re-binding of symbols when sources are immutable, Phillip Lord, 2015/08/04
- [elpa] externals/dash a06e66e 382/426: Add test for clean byte compilation, Phillip Lord, 2015/08/04
- [elpa] externals/dash 43dcd37 295/426: Only eval NUM in --dotimes once, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4ecfea6 296/426: Merge pull request #79 from Fuco1/debug-forms, Phillip Lord, 2015/08/04
- [elpa] externals/dash 624c501 306/426: Add `-table` and `-table-flat`, Phillip Lord, 2015/08/04
- [elpa] externals/dash cf7ca23 415/426: [Fix #97] Add -remove-item, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2eefbec 386/426: Don't use an inline comment on a line of its own, Phillip Lord, 2015/08/04
- [elpa] externals/dash bbc1d9c 309/426: `--each-while` should also expose `it-index`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6bdcfa5 286/426: Add -split-on, -split-when, Phillip Lord, 2015/08/04
- [elpa] externals/dash bd85b7c 302/426: Make -zip support infinite (circular) lists,
Phillip Lord <=
- [elpa] externals/dash 19fbc24 426/426: Fix anaphoric -spice-list macro, Phillip Lord, 2015/08/04
- [elpa] externals/dash 36b7f49 419/426: [-let] Reuse the ignore-place predicate, Phillip Lord, 2015/08/04
- [elpa] externals/dash 703bb59 297/426: Convert -zip to support variable-length arguments, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3132ae0 314/426: Alias -tail to nthcdr, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4098ea0 285/426: Merge pull request #74 from YoungFrog/dashfontifix, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0c045f2 369/426: Highlight with el instead of cl, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5086d24 293/426: Merge pull request #60 from rejeep/cask, Phillip Lord, 2015/08/04
- [elpa] externals/dash 1fde888 407/426: Merge pull request #125 from wasamasa/feature-some, Phillip Lord, 2015/08/04
- [elpa] externals/dash 51a07b1 408/426: Merge pull request #127 from occidens/fixfn, Phillip Lord, 2015/08/04
- [elpa] externals/dash ffa37bf 425/426: Merge pull request #129 from holomorph/docs, Phillip Lord, 2015/08/04