[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash d308676 225/316: Fix signal argument and case wher
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash d308676 225/316: Fix signal argument and case where start is null |
Date: |
Mon, 15 Feb 2021 15:58:05 -0500 (EST) |
branch: externals/dash
commit d30867607c80012dac297b70984c9fae5c11e0b6
Author: Mark Oteiza <mvoteiza@udel.edu>
Commit: Mark Oteiza <mvoteiza@udel.edu>
Fix signal argument and case where start is null
If either of the optional arguments are empty, just set them to the
defaults.
---
dash.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dash.el b/dash.el
index afa5fad..375cc7d 100644
--- a/dash.el
+++ b/dash.el
@@ -2160,16 +2160,16 @@ Starts from START and adds STEP each time. The default
START is
zero, the default STEP is 1.
This function takes its name from the corresponding primitive in
the APL language."
- (if (or (not (integerp count)) (< count 0))
- (signal 'wrong-type-argument count))
- (if (and step (zerop step)) (make-list count start)
- (let ((res '())
- (x (or start 0))
- (dx (or step 1)))
+ (when (not (natnump count))
+ (signal 'wrong-type-argument (list #'natnump count)))
+ (or start (setq start 0))
+ (or step (setq step 1))
+ (if (zerop step) (make-list count start)
+ (let (result)
(while (<= 0 (setq count (1- count)))
- (push x res)
- (setq x (+ x dx)))
- (nreverse res))))
+ (push start result)
+ (setq start (+ start step)))
+ (nreverse result))))
(defun -fix (fn list)
"Compute the (least) fixpoint of FN with initial input LIST.
- [elpa] externals/dash 5a64259 218/316: ; Move -doto/--doto next to other threading macros, (continued)
- [elpa] externals/dash 5a64259 218/316: ; Move -doto/--doto next to other threading macros, ELPA Syncer, 2021/02/15
- [elpa] externals/dash b3c58ff 221/316: Fix docstring of -list, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 26f065f 129/316: Merge pull request #282 from yyoncho/anamorphic-doto, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 4abffdc 123/316: Update docs, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 677c156 134/316: Merge pull request #290 from leungbk/rotate, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1549860 139/316: Merge pull request #296 from cireu/fix-hash-opt-expander, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 93e0465 137/316: Remove dependecy `macroexp`, ELPA Syncer, 2021/02/15
- [elpa] externals/dash a358b79 143/316: Speed up `-uniq` with hash-table., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 77f3bf4 142/316: Merge pull request #302 from bbatsov/patch-1, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 38dc929 222/316: Fix, improve, and extend anaphoric folds, ELPA Syncer, 2021/02/15
- [elpa] externals/dash d308676 225/316: Fix signal argument and case where start is null,
ELPA Syncer <=
- [elpa] externals/dash 994cda9 228/316: Simplify -cons-pair?, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 11907f4 145/316: Speed up `-uniq` with hash-table. (#305), ELPA Syncer, 2021/02/15
- [elpa] externals/dash ad21e13 146/316: Ignore all .elc and TAGS files, ELPA Syncer, 2021/02/15
- [elpa] externals/dash fae51b5 147/316: Make -inits not destroy its argument, ELPA Syncer, 2021/02/15
- [elpa] externals/dash ce1294b 152/316: Optimize non-destructive -inits, ELPA Syncer, 2021/02/15
- [elpa] externals/dash a743ae3 153/316: Merge pull request #313 from SwiftLawnGnome/master, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 62707a6 154/316: Avoid interning unused symbols in destructuring, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 9631947 155/316: Merge pull request #317 from cireu/feat/intern-soft, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 0ee27a4 157/316: Clarify docs on -zip-pair future behaviour, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 5f65fdf 159/316: Merge pull request #321 from wbolster/some-macro-indentation, ELPA Syncer, 2021/02/15