[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 5637bd6 322/439: Add alias from -find to -first
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 5637bd6 322/439: Add alias from -find to -first |
Date: |
Tue, 04 Aug 2015 20:29:40 +0000 |
branch: externals/dash
commit 5637bd6f1b9cb757897deed26ec2a7400b63610e
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>
Add alias from -find to -first
---
README.md | 2 ++
dash.el | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/README.md b/README.md
index b6fcc96..534edaa 100644
--- a/README.md
+++ b/README.md
@@ -1233,6 +1233,8 @@ Returns the first x in `list` where (`pred` x) is
non-nil, else nil.
To get the first item in the list no questions asked, use `car`.
+This function is also available as `-find`.
+
```cl
(-first 'even? '(1 2 3)) ;; => 2
(-first 'even? '(1 3 5)) ;; => nil
diff --git a/dash.el b/dash.el
index 0f1eebc..d987ef8 100644
--- a/dash.el
+++ b/dash.el
@@ -329,9 +329,14 @@ If ELEMENTS is non nil, append these to the list as well."
(defun -first (pred list)
"Returns the first x in LIST where (PRED x) is non-nil, else nil.
-To get the first item in the list no questions asked, use `car'."
+To get the first item in the list no questions asked, use `car'.
+
+This function is also available as `-find'."
(--first (funcall pred it) list))
+(defalias '-find '-first)
+(defalias '--find '--first)
+
(defmacro --last (form list)
"Anaphoric form of `-last'."
(declare (debug (form form)))
@@ -1480,6 +1485,8 @@ structure such as plist or alist."
"-snoc"
"-first"
"--first"
+ "-find"
+ "--find"
"-last"
"--last"
"-first-item"
- [elpa] externals/dash 3132ae0 314/439: Alias -tail to nthcdr, (continued)
- [elpa] externals/dash 3132ae0 314/439: Alias -tail to nthcdr, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2ecc073 316/439: Reorder the partition examples to follow more logical order, add tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash bbc1d9c 309/439: `--each-while` should also expose `it-index`, Phillip Lord, 2015/08/04
- [elpa] externals/dash d948086 315/439: Add -iteratefn, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7f0fadc 317/439: Add -prodfn, Phillip Lord, 2015/08/04
- [elpa] externals/dash eea928a 320/439: Add -replace, Phillip Lord, 2015/08/04
- [elpa] externals/dash f3b0a55 321/439: Change -predicate-p examples to -predicate? to maintain consistency, Phillip Lord, 2015/08/04
- [elpa] externals/dash a09a4b2 318/439: Add code markup for docstrings and fix erroneous whitespace in docstring, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7e4adb5 319/439: Add missing keywords to highlight list, Phillip Lord, 2015/08/04
- [elpa] externals/dash 174747e 323/439: Add -splice and -splice-list, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5637bd6 322/439: Add alias from -find to -first,
Phillip Lord <=
- [elpa] externals/dash 9ebcce6 325/439: Add some niceties to font-locking of examples, Phillip Lord, 2015/08/04
- [elpa] externals/dash f8873a0 327/439: Update readme-template with changes from last release, Phillip Lord, 2015/08/04
- [elpa] externals/dash f18a520 326/439: Release 2.7.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash f257fb9 328/439: Add -butlast, Phillip Lord, 2015/08/04
- [elpa] externals/dash d9879e9 329/439: Release 2.8.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 25c114c 330/439: Implementing a shallow copy counterpart to -clone., Phillip Lord, 2015/08/04
- [elpa] externals/dash 6fc652d 331/439: Merge pull request #95 from Wilfred/shallow-copy-function, Phillip Lord, 2015/08/04
- [elpa] externals/dash d37947a 332/439: Add -tree-seq, Phillip Lord, 2015/08/04
- [elpa] externals/dash 166bccd 333/439: Add -tree-map-nodes, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3adad97 334/439: Add -non-nil, Phillip Lord, 2015/08/04