emacs-elpa-diffs
[Top][All Lists]
Advanced

[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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]