[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 7583e65 248/316: Revert --map to using mapcar
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash 7583e65 248/316: Revert --map to using mapcar |
Date: |
Mon, 15 Feb 2021 15:58:10 -0500 (EST) |
branch: externals/dash
commit 7583e6511bd2d34c6ce872450ec39732968c9db4
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Revert --map to using mapcar
Code in the wild relies on mapcar for working with non-list
sequences, and mapcar can still be faster in some degenerate cases.
* dash.el (--map): Use mapcar again.
Fixes #365.
---
dash.el | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/dash.el b/dash.el
index a60b107..2909e07 100644
--- a/dash.el
+++ b/dash.el
@@ -207,14 +207,7 @@ Each element of LIST in turn is bound to `it' before
evaluating
BODY.
This is the anaphoric counterpart to `-map'."
(declare (debug (form form)))
- (let ((l (make-symbol "list"))
- (r (make-symbol "res")))
- `(let ((,l ,list) ,r it)
- (ignore it)
- (while ,l
- (setq it (pop ,l))
- (push ,form ,r))
- (nreverse ,r))))
+ `(mapcar (lambda (it) (ignore it) ,form) ,list))
(defmacro --reduce-from (form init list)
"Accumulate a value by evaluating FORM across LIST.
- [elpa] externals/dash f975634 233/316: Merge pull request #235, (continued)
- [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, 2021/02/15
- [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 <=
- [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
- [elpa] externals/dash 0e5acda 260/316: Simplify -non-nil, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 9ad0d2b 266/316: Extend -map-indexed docs and tests, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f61769d 256/316: * dash.el (dash--keywords): Prefer rx., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2aeb4e4 264/316: Use actual advertised function signature in README, ELPA Syncer, 2021/02/15
- [elpa] externals/dash a536770 267/316: Prefer relative image links in README, ELPA Syncer, 2021/02/15
- [elpa] externals/dash ce4a344 258/316: Eliminate odd? from examples, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f3ae7bb 259/316: Alias -remove-item to remove, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 525ede2 265/316: Improve docstring Markdown formatting, ELPA Syncer, 2021/02/15