[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash f69a9df 071/316: Replace -first with -some in -any
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash f69a9df 071/316: Replace -first with -some in -any? |
Date: |
Mon, 15 Feb 2021 15:57:28 -0500 (EST) |
branch: externals/dash
commit f69a9df16fe4edbda829f1f6a2b1f5a7856e4744
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Replace -first with -some in -any?
Extend examples accordingly.
Fixes #239
---
dash.el | 2 +-
dev/examples.el | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dash.el b/dash.el
index 9d30c6a..4942772 100644
--- a/dash.el
+++ b/dash.el
@@ -629,7 +629,7 @@ Alias: `-any'"
(defmacro --any? (form list)
"Anaphoric form of `-any?'."
(declare (debug (form form)))
- `(---truthy? (--first ,form ,list)))
+ `(---truthy? (--some ,form ,list)))
(defun -any? (pred list)
"Return t if (PRED x) is non-nil for any x in LIST, else nil.
diff --git a/dev/examples.el b/dev/examples.el
index d19164a..8b94fdb 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -384,6 +384,8 @@ new list."
(defexamples -any?
(-any? 'even? '(1 2 3)) => t
(-any? 'even? '(1 3 5)) => nil
+ (-any? 'null '(1 3 5)) => nil
+ (-any? 'null '(1 3 ())) => t
(--any? (= 0 (% it 2)) '(1 2 3)) => t)
(defexamples -all?
@@ -698,10 +700,14 @@ new list."
(defexamples -first
(-first 'even? '(1 2 3)) => 2
(-first 'even? '(1 3 5)) => nil
+ (-first 'null '(1 3 5)) => nil
+ (-first 'null '(1 3 ())) => nil
(--first (> it 2) '(1 2 3)) => 3)
(defexamples -some
(-some 'even? '(1 2 3)) => t
+ (-some 'null '(1 2 3)) => nil
+ (-some 'null '(1 2 ())) => t
(--some (member 'foo it) '((foo bar) (baz))) => '(foo bar)
(--some (plist-get it :bar) '((:foo 1 :bar 2) (:baz 3))) => 2)
- [elpa] externals/dash 05dc0aa 062/316: Add copyright assignment statement to documentation, (continued)
- [elpa] externals/dash 05dc0aa 062/316: Add copyright assignment statement to documentation, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 4de2189 027/316: [Feature #185] -cut <> in first slot is a function, ELPA Syncer, 2021/02/15
- [elpa] externals/dash b45b38a 039/316: Fix typo, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 07c61f5 046/316: [#200] Add tests for generalized variables, ELPA Syncer, 2021/02/15
- [elpa] externals/dash ff323e0 049/316: Fix setf on emacs23 (#205), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 958e3fb 051/316: Merge pull request #206 from Silex/master, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 98e819e 053/316: Merge pull request #210 from Wilfred/car_opcode_with_first_item, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 6a57833 054/316: Add -iota (#207), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1e14307 061/316: Merge pull request #221 from zck/it-anywhere-in-->, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 0468a31 063/316: Merge pull request #223 from phillord/feature/doc-copyright, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f69a9df 071/316: Replace -first with -some in -any?,
ELPA Syncer <=
- [elpa] externals/dash 1422b70 042/316: Update info, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 73a28ae 043/316: Fix function application in documentation, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 53e641c 044/316: [Fix #202] -table-flat works on input of dimension 1, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f04df47 048/316: Fix the debug declaration for -->, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 81ef1ef 055/316: Replace string-to-int with string-to-number (#216), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 13a4718 059/316: Add new partition-before, -after methods., ELPA Syncer, 2021/02/15
- [elpa] externals/dash ca2f767 064/316: Show (VAR VAL) in the function signature, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 0297166 068/316: Docs: Clarify that we don't modify the original list, ELPA Syncer, 2021/02/15
- [elpa] externals/dash a57c2c3 082/316: Merge pull request #245 from duianto/patch-1, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 5b549bc 085/316: Add missing fontification keywords, ELPA Syncer, 2021/02/15