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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dash 2c5b86e 117/439: Add -join as alias to -distinct.


From: Phillip Lord
Subject: [elpa] externals/dash 2c5b86e 117/439: Add -join as alias to -distinct.
Date: Tue, 04 Aug 2015 20:27:02 +0000

branch: externals/dash
commit 2c5b86ed0c15c963973c5a549530eed16ad5a141
Author: Johan Andersson <address@hidden>
Commit: Johan Andersson <address@hidden>

    Add -join as alias to -distinct.
---
 README.md |    2 ++
 dash.el   |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/README.md b/README.md
index b93499e..2bacc0a 100644
--- a/README.md
+++ b/README.md
@@ -425,6 +425,8 @@ 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.
 
+Alias: `-uniq`
+
 ```cl
 (-distinct '()) ;; => '()
 (-distinct '(1 2 2 4)) ;; => '(1 2 4)
diff --git a/dash.el b/dash.el
index 4ed2a8d..e76a81e 100644
--- a/dash.el
+++ b/dash.el
@@ -468,11 +468,15 @@ in in second form, etc."
 (defun -distinct (list)
   "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."
+or with `-compare-fn' if that's non-nil.
+
+Alias: `-uniq'"
   (let (result)
     (--each list (when (not (-contains? result it)) (!cons it result)))
     (nreverse result)))
 
+(defalias '-uniq '-distinct)
+
 (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',



reply via email to

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