[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 5614753 182/439: Fix bug with -partition-all-in-st
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 5614753 182/439: Fix bug with -partition-all-in-steps |
Date: |
Tue, 04 Aug 2015 20:27:43 +0000 |
branch: externals/dash
commit 5614753d737f038d9b2f64c7e601507cddabc1b2
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>
Fix bug with -partition-all-in-steps
---
dash.el | 2 +-
dev/examples.el | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dash.el b/dash.el
index 735f539..9bd721c 100644
--- a/dash.el
+++ b/dash.el
@@ -469,7 +469,7 @@ The last groups may contain less than N items."
If there are not enough items to make the last group N-sized,
those items are discarded."
(let ((result (---partition-all-in-steps-reversed n step list)))
- (while (< (length (car result)) n)
+ (while (and result (< (length (car result)) n))
(!cdr result))
(nreverse result)))
diff --git a/dev/examples.el b/dev/examples.el
index c6f99df..1f005b6 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -172,12 +172,14 @@
(defexamples -partition-all-in-steps
(-partition-all-in-steps 2 1 '(1 2 3 4)) => '((1 2) (2 3) (3 4) (4))
(-partition-all-in-steps 3 2 '(1 2 3 4)) => '((1 2 3) (3 4))
- (-partition-all-in-steps 3 2 '(1 2 3 4 5)) => '((1 2 3) (3 4 5) (5)))
+ (-partition-all-in-steps 3 2 '(1 2 3 4 5)) => '((1 2 3) (3 4 5) (5))
+ (-partition-all-in-steps 2 1 '(1)) => '((1)))
(defexamples -partition-in-steps
(-partition-in-steps 2 1 '(1 2 3 4)) => '((1 2) (2 3) (3 4))
(-partition-in-steps 3 2 '(1 2 3 4)) => '((1 2 3))
- (-partition-in-steps 3 2 '(1 2 3 4 5)) => '((1 2 3) (3 4 5)))
+ (-partition-in-steps 3 2 '(1 2 3 4 5)) => '((1 2 3) (3 4 5))
+ (-partition-in-steps 2 1 '(1)) => '())
(defexamples -partition-all
(-partition-all 2 '(1 2 3 4 5 6)) => '((1 2) (3 4) (5 6))
- [elpa] externals/dash 0ff070b 169/439: Merge pull request #28 from shosti/master, (continued)
- [elpa] externals/dash 0ff070b 169/439: Merge pull request #28 from shosti/master, Phillip Lord, 2015/08/04
- [elpa] externals/dash 73ac975 174/439: Merge pull request #29 from shosti/when-let-multi, Phillip Lord, 2015/08/04
- [elpa] externals/dash f8db9e1 176/439: Avoid unnecessary copying for -insert-at, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6d328e4 175/439: Release 1.2.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8f9fca3 177/439: Merge pull request #30 from shosti/insert-at-opt, Phillip Lord, 2015/08/04
- [elpa] externals/dash 336e5a5 181/439: Release 1.3.1, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6437adc 179/439: Release 1.3.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3c546ab 178/439: Add -partition-in-steps & -partition-all-in-steps, Phillip Lord, 2015/08/04
- [elpa] externals/dash e870be8 173/439: Add -when-let* and -if-let*, Phillip Lord, 2015/08/04
- [elpa] externals/dash a3faf7c 183/439: Release 1.3.2, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5614753 182/439: Fix bug with -partition-all-in-steps,
Phillip Lord <=
- [elpa] externals/dash 4c8c410 180/439: Add new functions to syntax highlighting, Phillip Lord, 2015/08/04
- [elpa] externals/dash 49de164 184/439: Declare debug-info for some macros, Phillip Lord, 2015/08/04
- [elpa] externals/dash 1fc6679 185/439: Add -map-indexed to syntax highlighting, Phillip Lord, 2015/08/04
- [elpa] externals/dash 50659cc 189/439: Release 1.4.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash ff3d7bd 190/439: Add -sum function., Phillip Lord, 2015/08/04
- [elpa] externals/dash 12291f3 191/439: Add -product function., Phillip Lord, 2015/08/04
- [elpa] externals/dash de67c4b 188/439: Add `-sort`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3226100 194/439: Indent according to emacs lisp standard, Phillip Lord, 2015/08/04
- [elpa] externals/dash 962e5b8 187/439: Merge pull request #33 from Fuco1/reduce-r, Phillip Lord, 2015/08/04
- [elpa] externals/dash d556884 186/439: Add reduce-r, the right associative variant of reduce, Phillip Lord, 2015/08/04