[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 81a3247 104/439: Let -each and -each-while take mu
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 81a3247 104/439: Let -each and -each-while take multiple forms. |
Date: |
Tue, 04 Aug 2015 20:26:55 +0000 |
branch: externals/dash
commit 81a3247609d736646fc4fe6ccbb346936e1f88d1
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>
Let -each and -each-while take multiple forms.
---
dash.el | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dash.el b/dash.el
index 0a167ce..7a81131 100644
--- a/dash.el
+++ b/dash.el
@@ -35,20 +35,20 @@
"Destructive: Sets LIST to the cdr of LIST."
`(setq ,list (cdr ,list)))
-(defmacro --each (list form)
+(defmacro --each (list &rest body)
"Anaphoric form of `-each'."
(let ((l (make-symbol "list")))
`(let ((,l ,list))
(while ,l
(let ((it (car ,l)))
- ,form)
+ ,@body)
(!cdr ,l)))))
(defun -each (list fn)
"Calls FN with every item in LIST. Returns nil, used for side-effects only."
(--each list (funcall fn it)))
-(defmacro --each-while (list pred form)
+(defmacro --each-while (list pred &rest body)
"Anaphoric form of `-each-while'."
(let ((l (make-symbol "list"))
(c (make-symbol "continue")))
@@ -56,7 +56,7 @@
(,c t))
(while (and ,l ,c)
(let ((it (car ,l)))
- (if ,pred ,form (setq ,c nil)))
+ (if (not ,pred) (setq ,c nil) ,@body))
(!cdr ,l)))))
(defun -each-while (list pred fn)
- [elpa] externals/dash b0da7b2 093/439: Declare macros before using them., (continued)
- [elpa] externals/dash b0da7b2 093/439: Declare macros before using them., Phillip Lord, 2015/08/04
- [elpa] externals/dash 6931d8a 094/439: Remove Melpa from installation while waiting for it to be included., Phillip Lord, 2015/08/04
- [elpa] externals/dash 0c55a4b 090/439: 1.0.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0bd26ac 096/439: Add aliases for -p instead of ?, Phillip Lord, 2015/08/04
- [elpa] externals/dash a2941cd 097/439: Typo, Phillip Lord, 2015/08/04
- [elpa] externals/dash dc6f46c 098/439: Simplify docs-generation using dash., Phillip Lord, 2015/08/04
- [elpa] externals/dash f1c8453 083/439: Rename to dash., Phillip Lord, 2015/08/04
- [elpa] externals/dash eacb6f2 092/439: Docs: Better generation of github urls., Phillip Lord, 2015/08/04
- [elpa] externals/dash 12ed9f6 100/439: Add destructive operations !cons og !cdr, Phillip Lord, 2015/08/04
- [elpa] externals/dash 79b56cc 101/439: Use --each, !cons and !cdr to simplify implementations., Phillip Lord, 2015/08/04
- [elpa] externals/dash 81a3247 104/439: Let -each and -each-while take multiple forms.,
Phillip Lord <=
- [elpa] externals/dash ba60707 103/439: Use --each-while to simplify implementations., Phillip Lord, 2015/08/04
- [elpa] externals/dash eb50d17 106/439: Add Melpa back in., Phillip Lord, 2015/08/04
- [elpa] externals/dash 4fedd2e 099/439: Add -partition and -partition-all, Phillip Lord, 2015/08/04
- [elpa] externals/dash 38eed45 095/439: Add rainbow-dash, Phillip Lord, 2015/08/04
- [elpa] externals/dash 49512b9 107/439: Simplify -take and -drop with --dotimes, Phillip Lord, 2015/08/04
- [elpa] externals/dash ed47814 105/439: Add -dotimes, Phillip Lord, 2015/08/04
- [elpa] externals/dash a08fc14 102/439: Add -each-while, Phillip Lord, 2015/08/04
- [elpa] externals/dash c56925a 111/439: Add font-lock for new functions and the `it` token., Phillip Lord, 2015/08/04
- [elpa] externals/dash a336d78 112/439: Add -only-some?, Phillip Lord, 2015/08/04
- [elpa] externals/dash 03370ea 108/439: Simplify examples-to-docs and examples-to-tests with dash, Phillip Lord, 2015/08/04