[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 70caa37 432/439: Merge pull request #144 from camm
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 70caa37 432/439: Merge pull request #144 from cammsaul/thread_last_make_second_arg_optional |
Date: |
Tue, 04 Aug 2015 20:31:46 +0000 |
branch: externals/dash
commit 70caa37eed551e167f05f1b3bdfa635b63fe1414
Merge: 7aec562 63d2db9
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>
Merge pull request #144 from cammsaul/thread_last_make_second_arg_optional
Make ->>'s second arg optional
---
dash.el | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dash.el b/dash.el
index 9788de6..483b080 100644
--- a/dash.el
+++ b/dash.el
@@ -1168,16 +1168,17 @@ second item in second form, etc."
(list form x)))
(:else `(-> (-> ,x ,form) ,@more))))
-(defmacro ->> (x form &rest more)
+(defmacro ->> (x &optional form &rest more)
"Thread the expr through the forms. Insert X as the last item
in the first form, making a list of it if it is not a list
already. If there are more forms, insert the first form as the
last item in second form, etc."
- (if (null more)
- (if (listp form)
- `(,(car form) ,@(cdr form) ,x)
- (list form x))
- `(->> (->> ,x ,form) ,@more)))
+ (cond
+ ((null form) x)
+ ((null more) (if (listp form)
+ `(,@form ,x)
+ (list form x)))
+ (:else `(->> (->> ,x ,form) ,@more))))
(defmacro --> (x form &rest more)
"Thread the expr through the forms. Insert X at the position
- [elpa] externals/dash dab0d1c 384/439: Merge pull request #107 from fbergroth/workaround-byte-compiler, (continued)
- [elpa] externals/dash dab0d1c 384/439: Merge pull request #107 from fbergroth/workaround-byte-compiler, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7d62b1a 393/439: Make test suite independent of dash, Phillip Lord, 2015/08/04
- [elpa] externals/dash 26c1bbe 390/439: Merge pull request #113 from fbergroth/fix-byte-compile-test, Phillip Lord, 2015/08/04
- [elpa] externals/dash c34e4ab 394/439: Update invalid tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 07f0358 392/439: Add test case operator !!> for expected errors, Phillip Lord, 2015/08/04
- [elpa] externals/dash 92ed7ff 391/439: Use vendored ert only on emacs23, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7aec562 430/439: Merge pull request #140 from mijoharas/master, Phillip Lord, 2015/08/04
- [elpa] externals/dash 63d2db9 431/439: make ->>'s second arg optional, Phillip Lord, 2015/08/04
- [elpa] externals/dash 45bd985 427/439: Reimplementation of --group-by., Phillip Lord, 2015/08/04
- [elpa] externals/dash aa13c07 429/439: fixed typo in docs (first where it should be last, Phillip Lord, 2015/08/04
- [elpa] externals/dash 70caa37 432/439: Merge pull request #144 from cammsaul/thread_last_make_second_arg_optional,
Phillip Lord <=
- [elpa] externals/dash 1677338 428/439: Merge pull request #138 from phillord/fix/group-by-write-out, Phillip Lord, 2015/08/04
- [elpa] externals/dash e468937 435/439: Formatting, Phillip Lord, 2015/08/04
- [elpa] externals/dash 89abffe 437/439: Make it explicit that not all VALS are evalled in -if-let*, Phillip Lord, 2015/08/04
- [elpa] externals/dash b88cfb7 436/439: Add dash prefix to epsilon variable., Phillip Lord, 2015/08/04
- [elpa] externals/dash eadb265 439/439: Swap examples to better show how -some-> works, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2aeeacb 433/439: Release 2.11.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash c3cf98d 438/439: Add `-some->`, `-some->>`, and `-some-->` macros., Phillip Lord, 2015/08/04
- [elpa] externals/dash 1c2f43d 434/439: Add "See also" for the reduce family, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2b69c14 411/439: Add dash.info and dash.texi to repo, Phillip Lord, 2015/08/04
- [elpa] externals/dash e574465 404/439: Add `-some`, Phillip Lord, 2015/08/04