[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 4b63be1 362/426: Declare --mapcat macro before usi
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 4b63be1 362/426: Declare --mapcat macro before using it. #102 |
Date: |
Tue, 04 Aug 2015 19:38:54 +0000 |
branch: externals/dash
commit 4b63be1dce156545bd5f534e91d4a491aa7b06e9
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>
Declare --mapcat macro before using it. #102
---
dash.el | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dash.el b/dash.el
index 078305d..98c0df6 100644
--- a/dash.el
+++ b/dash.el
@@ -287,6 +287,16 @@ Elements are compared using `equal'.
See also: `-replace-at'"
(--map-when (equal it old) new list))
+(defmacro --mapcat (form list)
+ "Anaphoric form of `-mapcat'."
+ (declare (debug (form form)))
+ `(apply 'append (--map ,form ,list)))
+
+(defun -mapcat (fn list)
+ "Return the concatenation of the result of mapping FN over LIST.
+Thus function FN should return a list."
+ (--mapcat (funcall fn it) list))
+
(defun -flatten (l)
"Take a nested list L and return its contents as a single, flat list.
@@ -305,16 +315,6 @@ See also: `-flatten'"
"Return a new list with the concatenation of the elements in the supplied
LISTS."
(apply 'append lists))
-(defmacro --mapcat (form list)
- "Anaphoric form of `-mapcat'."
- (declare (debug (form form)))
- `(apply 'append (--map ,form ,list)))
-
-(defun -mapcat (fn list)
- "Return the concatenation of the result of mapping FN over LIST.
-Thus function FN should return a list."
- (--mapcat (funcall fn it) list))
-
(defalias '-copy 'copy-sequence
"Create a shallow copy of LIST.")
- [elpa] externals/dash f939201 347/426: [-let] Optimize shifting/binding of unused _ places, (continued)
- [elpa] externals/dash f939201 347/426: [-let] Optimize shifting/binding of unused _ places, Phillip Lord, 2015/08/04
- [elpa] externals/dash c1d555b 355/426: [-let] Optimize single-binding of vectors and kv, Phillip Lord, 2015/08/04
- [elpa] externals/dash edb1e31 356/426: [-let] Add more tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9ec1a02 354/426: [-let] Abstract the _ test into a function, Phillip Lord, 2015/08/04
- [elpa] externals/dash 31f321a 358/426: Release 2.9.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 40849a7 357/426: [-let] Remove stale comment, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2626840 336/426: Add -fixfn, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2436bf8 361/426: Add debug declaration on -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4d67b25 345/426: [-let] Do not reinvent `pop', Phillip Lord, 2015/08/04
- [elpa] externals/dash f7664c6 352/426: [-let] Add &keys support for cons matcher, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4b63be1 362/426: Declare --mapcat macro before using it. #102,
Phillip Lord <=
- [elpa] externals/dash 0310e0e 359/426: Update docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0fc5d73 351/426: [-let] Make the cons matcher temp-bind as late as possible, Phillip Lord, 2015/08/04
- [elpa] externals/dash 75d29a2 363/426: Declare --iterate macro before using it. #102, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3bdf60b 365/426: Add some examples, Phillip Lord, 2015/08/04
- [elpa] externals/dash 65a3736 349/426: [-let] Fix improper list non-symbol last argument handler, Phillip Lord, 2015/08/04
- [elpa] externals/dash 549bfd3 366/426: Reorder macros to make sure they are declared before being used, Phillip Lord, 2015/08/04
- [elpa] externals/dash db7f651 353/426: [-let] Simplify the conditions in dash--match-cons-1, Phillip Lord, 2015/08/04
- [elpa] externals/dash c6b92ae 324/426: Reorder the examples into more meaningful blocks, Phillip Lord, 2015/08/04
- [elpa] externals/dash 03b98ca 364/426: Make -if-let and -when-let families destructure their arguments, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5e9c1a9 373/426: Add Fredrik Bergroth to the list of contributors, Phillip Lord, 2015/08/04