[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 73204ca 022/426: Change !contains-p to !contains?
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 73204ca 022/426: Change !contains-p to !contains? to match clojure api. |
Date: |
Tue, 04 Aug 2015 19:36:27 +0000 |
branch: externals/dash
commit 73204ca935510adc436f1d06dd70e5cdbb37c73e
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>
Change !contains-p to !contains? to match clojure api.
---
bang.el | 8 ++++----
tests.el | 14 +++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/bang.el b/bang.el
index f2eea4c..085f76f 100644
--- a/bang.el
+++ b/bang.el
@@ -102,21 +102,21 @@ Thus function FN should return a collection."
"Return a new list with all duplicates removed.
The test for equality is done with `equal',
or with `!compare-fn' if that's non-nil."
- (!filter (not (!contains-p !--result it)) list))
+ (!filter (not (!contains? !--result it)) list))
(defun !intersection (list list2)
"Return a new list containing only the elements that are members of both
LIST and LIST2.
The test for equality is done with `equal',
or with `!compare-fn' if that's non-nil."
- (!filter (!contains-p list2 it) list))
+ (!filter (!contains? list2 it) list))
(defun !difference (list list2)
"Return a new list with only the members of LIST that are not in LIST2.
The test for equality is done with `equal',
or with `!compare-fn' if that's non-nil."
- (!filter (not (!contains-p list2 it)) list))
+ (!filter (not (!contains? list2 it)) list))
-(defun !contains-p (list element)
+(defun !contains? (list element)
"Return whether LIST contains ELEMENT.
The test for equality is done with `equal',
or with `!compare-fn' if that's non-nil."
diff --git a/tests.el b/tests.el
index ad07ed5..9bce0f3 100644
--- a/tests.el
+++ b/tests.el
@@ -72,10 +72,10 @@
(should (equal (!uniq '()) '()))
(should (equal (!uniq '(1 2 2 4)) '(1 2 4))))
-(ert-deftest contains-p ()
- "`!contains-p' returns t if the list contains the element."
- (should (!contains-p '(1 2 3) 1))
- (should (!contains-p '(1 2 3) 2))
- (should (not (!contains-p '() '())))
- (should (not (!contains-p '() 1)))
- (should (not (!contains-p '(1 2 4) 3))))
+(ert-deftest contains? ()
+ "`!contains?' returns t if the list contains the element."
+ (should (!contains? '(1 2 3) 1))
+ (should (!contains? '(1 2 3) 2))
+ (should (not (!contains? '() '())))
+ (should (not (!contains? '() 1)))
+ (should (not (!contains? '(1 2 4) 3))))
- [elpa] externals/dash 14673a6 007/426: Use nreverse for performance reasons., (continued)
- [elpa] externals/dash 14673a6 007/426: Use nreverse for performance reasons., Phillip Lord, 2015/08/04
- [elpa] externals/dash 065f76b 005/426: Use ert.el to run on Emacs 23 as well., Phillip Lord, 2015/08/04
- [elpa] externals/dash 3e0ef58 012/426: !filter can now take either a function or form (anaphoric), Phillip Lord, 2015/08/04
- [elpa] externals/dash d870282 013/426: Add some tests, and fix the bugs they uncovered., Phillip Lord, 2015/08/04
- [elpa] externals/dash b24d056 014/426: !map macro, Phillip Lord, 2015/08/04
- [elpa] externals/dash f9471e4 016/426: !concat done - one less 'cl dependency, Phillip Lord, 2015/08/04
- [elpa] externals/dash 302c8ea 001/426: Initial commit., Phillip Lord, 2015/08/04
- [elpa] externals/dash 07de30e 019/426: !mapcat macro, and with that: goodbye 'cl!, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4201ecd 017/426: Out with remove-if, in with !reject, Phillip Lord, 2015/08/04
- [elpa] externals/dash c229ba8 011/426: Rewrite to anaphoric filter function., Phillip Lord, 2015/08/04
- [elpa] externals/dash 73204ca 022/426: Change !contains-p to !contains? to match clojure api.,
Phillip Lord <=
- [elpa] externals/dash ad44aee 009/426: Add more tests., Phillip Lord, 2015/08/04
- [elpa] externals/dash f5b16e3 018/426: Make !partial have the same quote-less API as the rest of bang., Phillip Lord, 2015/08/04
- [elpa] externals/dash a02b6c1 021/426: Add note about no 'cl required., Phillip Lord, 2015/08/04
- [elpa] externals/dash 754dd0d 024/426: Create stand-alone anaphoric macros, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9e74cc0 027/426: Remove dead code., Phillip Lord, 2015/08/04
- [elpa] externals/dash 8eab3d1 028/426: Slight improvements to map., Phillip Lord, 2015/08/04
- [elpa] externals/dash 1997e52 031/426: Treat dashes in docstring better., Phillip Lord, 2015/08/04
- [elpa] externals/dash 52815c5 020/426: Add documentation, Phillip Lord, 2015/08/04
- [elpa] externals/dash d2dfb11 023/426: Use double-bang for anaphoric functions, Phillip Lord, 2015/08/04
- [elpa] externals/dash ed2e447 015/426: !reduce macro, Phillip Lord, 2015/08/04