[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 2c5b86e 117/426: Add -join as alias to -distinct.
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 2c5b86e 117/426: Add -join as alias to -distinct. |
Date: |
Tue, 04 Aug 2015 19:37:05 +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',
- [elpa] externals/dash a336d78 112/426: Add -only-some?, (continued)
- [elpa] externals/dash a336d78 112/426: Add -only-some?, Phillip Lord, 2015/08/04
- [elpa] externals/dash 81a3247 104/426: Let -each and -each-while take multiple forms., Phillip Lord, 2015/08/04
- [elpa] externals/dash d857f73 118/426: Merge pull request #3 from rejeep/join-alias, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9faa422 115/426: Add -partition-by, Phillip Lord, 2015/08/04
- [elpa] externals/dash f034c16 119/426: Add -union (thanks to @Fuco1), Phillip Lord, 2015/08/04
- [elpa] externals/dash 9a3dfdd 113/426: Name parameter PRED when function expects predicate., Phillip Lord, 2015/08/04
- [elpa] externals/dash cca9b1b 121/426: Also run tests on Emacs24, Phillip Lord, 2015/08/04
- [elpa] externals/dash c669282 123/426: Add @Fuco1 to list of contributors., Phillip Lord, 2015/08/04
- [elpa] externals/dash 12ed9f6 100/426: Add destructive operations !cons og !cdr, Phillip Lord, 2015/08/04
- [elpa] externals/dash c025efb 122/426: Add -separate (thanks @Fuco1), Phillip Lord, 2015/08/04
- [elpa] externals/dash 2c5b86e 117/426: Add -join as alias to -distinct.,
Phillip Lord <=
- [elpa] externals/dash 1c4e5d7 125/426: Remove eval from --reduce, it is evil., Phillip Lord, 2015/08/04
- [elpa] externals/dash 8f91ec8 126/426: 1.0.2, Phillip Lord, 2015/08/04
- [elpa] externals/dash 1120417 127/426: Add -group-by, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5e72ff9 120/426: Include numbers in github ids., Phillip Lord, 2015/08/04
- [elpa] externals/dash a23aa4b 128/426: Add examples for -group-by, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7f7ac33 130/426: Add Takafumi Arakaki to list of contributors., Phillip Lord, 2015/08/04
- [elpa] externals/dash 3044e83 129/426: Merge pull request #8 from tkf/group-by, Phillip Lord, 2015/08/04
- [elpa] externals/dash 85bd4e0 131/426: Add @tali713's -applify, Phillip Lord, 2015/08/04
- [elpa] externals/dash e9de223 116/426: Rename -replace-where to -map-when, Phillip Lord, 2015/08/04
- [elpa] externals/dash 002e4cd 132/426: Add tali713 to list of contributors., Phillip Lord, 2015/08/04