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

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

[elpa] externals/dash e680ad0 015/316: Merge pull request #173 from Wilf


From: ELPA Syncer
Subject: [elpa] externals/dash e680ad0 015/316: Merge pull request #173 from Wilfred/master
Date: Mon, 15 Feb 2021 15:57:15 -0500 (EST)

branch: externals/dash
commit e680ad0fdbc18b65fed9a56d3ba0cb04c10d4878
Merge: 8a46d3c 6ded2f2
Author: Matus Goljer <dota.keys@gmail.com>
Commit: Matus Goljer <dota.keys@gmail.com>

    Merge pull request #173 from Wilfred/master
    
    Add 'see also' to `-find-index` and `-find-last-index`.
---
 README.md | 6 ++++++
 dash.el   | 8 ++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index c2f4a39..453b5ab 100644
--- a/README.md
+++ b/README.md
@@ -442,6 +442,8 @@ Return a new list of the items in `list` for which `pred` 
returns a non-nil valu
 
 Alias: `-select`
 
+See also: [`-keep`](#-keep-fn-list)
+
 ```el
 (-filter (lambda (num) (= 0 (% num 2))) '(1 2 3 4)) ;; => '(2 4)
 (-filter 'even? '(1 2 3 4)) ;; => '(2 4)
@@ -1237,6 +1239,8 @@ Take a predicate `pred` and a `list` and return the index 
of the
 first element in the list satisfying the predicate, or nil if
 there is no such element.
 
+See also [`-first`](#-first-pred-list).
+
 ```el
 (-find-index 'even? '(2 4 1 6 3 3 5 8)) ;; => 0
 (--find-index (< 5 it) '(2 4 1 6 3 3 5 8)) ;; => 3
@@ -1249,6 +1253,8 @@ Take a predicate `pred` and a `list` and return the index 
of the
 last element in the list satisfying the predicate, or nil if
 there is no such element.
 
+See also [`-last`](#-last-pred-list).
+
 ```el
 (-find-last-index 'even? '(2 4 1 6 3 3 5 8)) ;; => 7
 (--find-last-index (< 5 it) '(2 7 1 6 3 8 5 2)) ;; => 5
diff --git a/dash.el b/dash.el
index 5f9f840..b799b44 100644
--- a/dash.el
+++ b/dash.el
@@ -1159,7 +1159,9 @@ predicate PRED, in ascending order."
 (defun -find-index (pred list)
   "Take a predicate PRED and a LIST and return the index of the
 first element in the list satisfying the predicate, or nil if
-there is no such element."
+there is no such element.
+
+See also `-first'."
   (car (-find-indices pred list)))
 
 (defmacro --find-index (form list)
@@ -1170,7 +1172,9 @@ there is no such element."
 (defun -find-last-index (pred list)
   "Take a predicate PRED and a LIST and return the index of the
 last element in the list satisfying the predicate, or nil if
-there is no such element."
+there is no such element.
+
+See also `-last'."
   (-last-item (-find-indices pred list)))
 
 (defmacro --find-last-index (form list)



reply via email to

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