[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash b308794 416/426: [Fix #73] Add a mention of -filte
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash b308794 416/426: [Fix #73] Add a mention of -filter to -keep docstring |
Date: |
Tue, 04 Aug 2015 19:39:19 +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 dab0d1c 384/426: Merge pull request #107 from fbergroth/workaround-byte-compiler, (continued)
- [elpa] externals/dash dab0d1c 384/426: Merge pull request #107 from fbergroth/workaround-byte-compiler, Phillip Lord, 2015/08/04
- [elpa] externals/dash 446c522 375/426: Release 2.10.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2dfd748 298/426: Merge pull request #87 from steventlamb/topic/make_zip_n_ary, Phillip Lord, 2015/08/04
- [elpa] externals/dash a3021eb 313/426: Merge pull request #93 from lunaryorn/patch-1, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8d2227d 380/426: Silence unused variable warning in -table, Phillip Lord, 2015/08/04
- [elpa] externals/dash f5264db 291/426: Merge pull request #77 from Fuco1/split-when, Phillip Lord, 2015/08/04
- [elpa] externals/dash c40fa44 383/426: Exclude byte compilation test on emacs23, Phillip Lord, 2015/08/04
- [elpa] externals/dash f0dd4cc 301/426: Add -annotate, Phillip Lord, 2015/08/04
- [elpa] externals/dash b44140a 288/426: Add -is-prefix/suffix/infix-p, Phillip Lord, 2015/08/04
- [elpa] externals/dash 38ef86e 376/426: Update debug forms for -if-let and -when-let, Phillip Lord, 2015/08/04
- [elpa] externals/dash b308794 416/426: [Fix #73] Add a mention of -filter to -keep docstring,
Phillip Lord <=
- [elpa] externals/dash 9642c4a 385/426: [Fix #108] Sync indentation of threading forms with Clojure, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0384eee 312/426: Improve Travis CI configuration, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6abc35a 277/426: Merge pull request #66 from rejeep/each-indent-level, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5f879b3 387/426: Merge pull request #110 from bbatsov/comment-fix, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8530742 410/426: Add @wasamasa and @occidens to list of contributors, Phillip Lord, 2015/08/04
- [elpa] externals/dash a803dd5 414/426: Merge readme changes, Phillip Lord, 2015/08/04
- [elpa] externals/dash 1d4881f 413/426: Update README, Phillip Lord, 2015/08/04
- [elpa] externals/dash b075846 287/426: Add -iterate, -unfold, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2db56f5 424/426: [-let] Add support for &as bindings (#115), Phillip Lord, 2015/08/04
- [elpa] externals/dash 47e11ae 378/426: Update docs, Phillip Lord, 2015/08/04