[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 73204ca 022/439: Change !contains-p to !contains?
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 73204ca 022/439: Change !contains-p to !contains? to match clojure api. |
Date: |
Tue, 04 Aug 2015 20:25:58 +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 d870282 013/439: Add some tests, and fix the bugs they uncovered., (continued)
- [elpa] externals/dash d870282 013/439: Add some tests, and fix the bugs they uncovered., Phillip Lord, 2015/08/04
- [elpa] externals/dash 3e0ef58 012/439: !filter can now take either a function or form (anaphoric), Phillip Lord, 2015/08/04
- [elpa] externals/dash b24d056 014/439: !map macro, Phillip Lord, 2015/08/04
- [elpa] externals/dash ed2e447 015/439: !reduce macro, Phillip Lord, 2015/08/04
- [elpa] externals/dash f9471e4 016/439: !concat done - one less 'cl dependency, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4201ecd 017/439: Out with remove-if, in with !reject, Phillip Lord, 2015/08/04
- [elpa] externals/dash f5b16e3 018/439: Make !partial have the same quote-less API as the rest of bang., Phillip Lord, 2015/08/04
- [elpa] externals/dash a02b6c1 021/439: Add note about no 'cl required., Phillip Lord, 2015/08/04
- [elpa] externals/dash 07de30e 019/439: !mapcat macro, and with that: goodbye 'cl!, Phillip Lord, 2015/08/04
- [elpa] externals/dash 52815c5 020/439: Add documentation, Phillip Lord, 2015/08/04
- [elpa] externals/dash 73204ca 022/439: Change !contains-p to !contains? to match clojure api.,
Phillip Lord <=
- [elpa] externals/dash 6c39876 003/439: Set up test framework with one basic test, Phillip Lord, 2015/08/04
- [elpa] externals/dash c0f2c8f 026/439: Test that it works with lexical binding., Phillip Lord, 2015/08/04
- [elpa] externals/dash 754dd0d 024/439: Create stand-alone anaphoric macros, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9e74cc0 027/439: Remove dead code., Phillip Lord, 2015/08/04
- [elpa] externals/dash 8eab3d1 028/439: Slight improvements to map., Phillip Lord, 2015/08/04
- [elpa] externals/dash d2dfb11 023/439: Use double-bang for anaphoric functions, Phillip Lord, 2015/08/04
- [elpa] externals/dash 85016d3 029/439: Fix quoted forms like `' in docs., Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f0636f 032/439: Show only three first examples per function., Phillip Lord, 2015/08/04
- [elpa] externals/dash 4cc4147 035/439: Fix typo, Phillip Lord, 2015/08/04
- [elpa] externals/dash 41d77ec 034/439: Add function list to readme., Phillip Lord, 2015/08/04