[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 5637bd6 322/426: Add alias from -find to -first
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 5637bd6 322/426: Add alias from -find to -first |
Date: |
Tue, 04 Aug 2015 19:38:36 +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 f257fb9 328/426: Add -butlast, (continued)
- [elpa] externals/dash f257fb9 328/426: Add -butlast, Phillip Lord, 2015/08/04
- [elpa] externals/dash 174747e 323/426: Add -splice and -splice-list, Phillip Lord, 2015/08/04
- [elpa] externals/dash ab99be6 335/426: Add -fix, Phillip Lord, 2015/08/04
- [elpa] externals/dash b1e585d 337/426: Update copyright notice, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3adad97 334/426: Add -non-nil, Phillip Lord, 2015/08/04
- [elpa] externals/dash 166bccd 333/426: Add -tree-map-nodes, Phillip Lord, 2015/08/04
- [elpa] externals/dash 05fa92f 342/426: [-let] Transpose nreverse/flatten, Phillip Lord, 2015/08/04
- [elpa] externals/dash f0831d3 339/426: Add -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9ebcce6 325/426: Add some niceties to font-locking of examples, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6fc652d 331/426: Merge pull request #95 from Wilfred/shallow-copy-function, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5637bd6 322/426: Add alias from -find to -first,
Phillip Lord <=
- [elpa] externals/dash a4be872 338/426: Add `-let` and `-let*`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 947ffda 341/426: Add support for &rest match for non-list sequences (like . for improper lists), Phillip Lord, 2015/08/04
- [elpa] externals/dash 9065e1b 344/426: [-let] Final cdr shift optimization, Phillip Lord, 2015/08/04
- [elpa] externals/dash d37947a 332/426: Add -tree-seq, Phillip Lord, 2015/08/04
- [elpa] externals/dash 51a0c9f 350/426: [-let] Fix expansion of _ symbols in vector matcher, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8f9fc41 340/426: Add support for multiple input arguments to -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7f2b3c7 343/426: [-lambda] test all match-forms before converting to regular lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f81492 346/426: [-lambda] Better error-handling, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f0bb7d 348/426: [-let] Fix dynamic scoping issue, Phillip Lord, 2015/08/04
- [elpa] externals/dash f939201 347/426: [-let] Optimize shifting/binding of unused _ places, Phillip Lord, 2015/08/04