[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat e00fc9c 03/99: Simplify mapcan implementation
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat e00fc9c 03/99: Simplify mapcan implementation |
Date: |
Sun, 17 Oct 2021 05:57:47 -0400 (EDT) |
branch: externals/compat
commit e00fc9c58622f21ace460b96a36800df53e9ed57
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Simplify mapcan implementation
Thanks to Mattias EngdegÄrd for point out the improvement.
---
compat-26.1.el | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/compat-26.1.el b/compat-26.1.el
index 1808b14..59d08eb 100644
--- a/compat-26.1.el
+++ b/compat-26.1.el
@@ -44,12 +44,7 @@
"Apply FUNC to each element of SEQUENCE.
Concatenate the results by altering them (using `nconc').
SEQUENCE may be a list, a vector, a boolean vector, or a string."
- (let (result)
- (mapc
- (lambda (elem)
- (setq result (nconc result (funcall func elem))))
- sequence)
- result))
+ (apply #'nconc (mapcar func sequence)))
(compat-advise line-number-at-pos (&optional position absolute)
"Handle optional argument ABSOLUTE:
- [elpa] branch externals/compat created (now 5506770), ELPA Syncer, 2021/10/17
- [elpa] externals/compat 51b832c 02/99: Remove compat--disable-defer check from installation check, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 10033e0 01/99: Initial import, ELPA Syncer, 2021/10/17
- [elpa] externals/compat e00fc9c 03/99: Simplify mapcan implementation,
ELPA Syncer <=
- [elpa] externals/compat 9688d79 05/99: Split proper-list-p into two implementations, ELPA Syncer, 2021/10/17
- [elpa] externals/compat c445418 04/99: Fix named-let implementation, ELPA Syncer, 2021/10/17
- [elpa] externals/compat b8e8cba 07/99: Use markdown instead of outline-mode for the README file, ELPA Syncer, 2021/10/17
- [elpa] externals/compat a403485 10/99: Require compat-macs in eval-when-compile instead of eval-and-compile, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 0d77194 14/99: Remove compat--disable-defer variable, ELPA Syncer, 2021/10/17
- [elpa] externals/compat eafe584 15/99: Remove unnecessary eval-and-compile block from compat-tests, ELPA Syncer, 2021/10/17
- [elpa] externals/compat c7d1615 06/99: Remove elisp-shorthands from compat-tests.el, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 5936773 08/99: Fix installation check, ELPA Syncer, 2021/10/17
- [elpa] externals/compat d77b31f 11/99: Reorder files to byte compile in Makefile, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 12e36f7 12/99: Check if actual name is fbound before binding a function or macro, ELPA Syncer, 2021/10/17