[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 3694ae9 236/316: * dash.el (-iota): Simplify and p
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash 3694ae9 236/316: * dash.el (-iota): Simplify and purify. |
Date: |
Mon, 15 Feb 2021 15:58:08 -0500 (EST) |
branch: externals/dash
commit 3694ae930577a233e4f094d2f83db0333395e8f7
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
* dash.el (-iota): Simplify and purify.
Re: #215.
---
dash.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dash.el b/dash.el
index 68d2749..b12588c 100644
--- a/dash.el
+++ b/dash.el
@@ -2705,16 +2705,14 @@ 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."
+ (declare (pure t) (side-effect-free t))
(unless (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 start result)
- (setq start (+ start step)))
- (nreverse result))))
+ (if (zerop step)
+ (make-list count start)
+ (--iterate (+ it step) start count)))
(defun -fix (fn list)
"Compute the (least) fixpoint of FN with initial input LIST.
- [elpa] externals/dash adf3a0d 208/316: Merge pull request #359 from blc/make, (continued)
- [elpa] externals/dash adf3a0d 208/316: Merge pull request #359 from blc/make, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1d58249 212/316: Write -iterate in terms of --iterate, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 47f8b2b 214/316: Clean up -doto, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 794bf8c 219/316: ; Fix omission in last change, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f9d67ae 223/316: Merge pull request #314 from blc/reductions, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 31a655b 224/316: Fix -cons* with no arguments, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3423be4 227/316: Merge pull request #364 from blc/info-look, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 558cd95 230/316: Fix take/drop splits (again), ELPA Syncer, 2021/02/15
- [elpa] externals/dash f975634 233/316: Merge pull request #235, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 8248997 234/316: Merge pull request #207 from holomorph/iota, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3694ae9 236/316: * dash.el (-iota): Simplify and purify.,
ELPA Syncer <=
- [elpa] externals/dash ca36c57 239/316: Allow -lambda with no arguments, ELPA Syncer, 2021/02/15
- [elpa] externals/dash bf8a462 243/316: Partially revert last change, ELPA Syncer, 2021/02/15
- [elpa] externals/dash d7d0acb 242/316: Don't call eval, ELPA Syncer, 2021/02/15
- [elpa] externals/dash bf8d876 238/316: Merge pull request #363 from blc/list, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 76ace7f 240/316: Fix error signaling, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1ccf08d 244/316: ; Fix last change, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2625bc5 247/316: Don't use insert-file-contents-literally, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 7583e65 248/316: Revert --map to using mapcar, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 6f5888c 251/316: Extend --filter and --remove docs and tests, ELPA Syncer, 2021/02/15
- [elpa] externals/dash db45ee7 252/316: Optimize -remove-first a bit, ELPA Syncer, 2021/02/15