[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash b308794 416/439: [Fix #73] Add a mention of -filte
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash b308794 416/439: [Fix #73] Add a mention of -filter to -keep docstring |
Date: |
Tue, 04 Aug 2015 20:31:32 +0000 |
branch: externals/dash
commit b308794148a779c07a120a57df0a09d900d8e087
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>
[Fix #73] Add a mention of -filter to -keep docstring
---
README.md | 2 ++
dash.el | 4 +++-
dash.texi | 2 ++
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/README.md b/README.md
index 50fcfae..78ac7d5 100644
--- a/README.md
+++ b/README.md
@@ -514,6 +514,8 @@ Bag of various functions which modify input list.
Return a new list of the non-nil results of applying `fn` to the items in
`list`.
+If you want to select the original items satisfying a predicate use
[`-filter`](#-filter-pred-list).
+
```el
(-keep 'cdr '((1 2 3) (4 5) (6))) ;; => '((2 3) (5))
(-keep (lambda (num) (when (> num 3) (* 10 num))) '(1 2 3 4 5 6)) ;; => '(40
50 60)
diff --git a/dash.el b/dash.el
index 1029ef2..000d575 100644
--- a/dash.el
+++ b/dash.el
@@ -242,7 +242,9 @@ Comparison is done with `equal'."
(nreverse ,r))))
(defun -keep (fn list)
- "Return a new list of the non-nil results of applying FN to the items in
LIST."
+ "Return a new list of the non-nil results of applying FN to the items in
LIST.
+
+If you want to select the original items satisfying a predicate use `-filter'."
(--keep (funcall fn it) list))
(defun -non-nil (list)
diff --git a/dash.texi b/dash.texi
index 7fd4a5c..08f5b22 100644
--- a/dash.texi
+++ b/dash.texi
@@ -589,6 +589,8 @@ Bag of various functions which modify input list.
@defun -keep (fn list)
Return a new list of the non-nil results of applying @var{fn} to the items in
@var{list}.
+If you want to select the original items satisfying a predicate use
@code{-filter} (@pxref{-filter}).
+
@example
@group
(-keep 'cdr '((1 2 3) (4 5) (6)))
- [elpa] externals/dash 81b808d 409/439: Ignore dash.elc, (continued)
- [elpa] externals/dash 81b808d 409/439: Ignore dash.elc, Phillip Lord, 2015/08/04
- [elpa] externals/dash c61113b 420/439: [-let] Update outdated comment, Phillip Lord, 2015/08/04
- [elpa] externals/dash 733274f 398/439: Merge pull request #120 from holomorph/info-manual, Phillip Lord, 2015/08/04
- [elpa] externals/dash a803dd5 414/439: Merge readme changes, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7bd6b3b 400/439: Add dir entry to texinfo template, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5219ac0 422/439: [-let] Eliminate useless re-binding of symbols when sources are immutable, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0ef7384 395/439: Merge pull request #114 from fbergroth/update-test-case, Phillip Lord, 2015/08/04
- [elpa] externals/dash 349931e 399/439: Add @holomorph to list of contributors, Phillip Lord, 2015/08/04
- [elpa] externals/dash 1d4881f 413/439: Update README, Phillip Lord, 2015/08/04
- [elpa] externals/dash 36b7f49 419/439: [-let] Reuse the ignore-place predicate, Phillip Lord, 2015/08/04
- [elpa] externals/dash b308794 416/439: [Fix #73] Add a mention of -filter to -keep docstring,
Phillip Lord <=
- [elpa] externals/dash 51a07b1 408/439: Merge pull request #127 from occidens/fixfn, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8530742 410/439: Add @wasamasa and @occidens to list of contributors, Phillip Lord, 2015/08/04
- [elpa] externals/dash db784f8 403/439: Merge pull request #124 from occidens/skiptests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9ebd172 421/439: [-let] Generate differently named symbols for temporary sources (makes, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7d7a457 402/439: Allow run-tests.sh to skip tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3a3f528 396/439: Add info manual, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4bd6273 397/439: Invoke makeinfo on the generated .texi, Phillip Lord, 2015/08/04
- [elpa] externals/dash cf7ca23 415/439: [Fix #97] Add -remove-item, Phillip Lord, 2015/08/04
- [elpa] externals/dash 90056bd 401/439: Merge pull request #121 from holomorph/master, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3992e3c 406/439: Make `-fixfn' more robust at handling floats, Phillip Lord, 2015/08/04