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

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

[elpa] externals/dash 13f9ece 060/316: add tests for nesting anaphoric m


From: ELPA Syncer
Subject: [elpa] externals/dash 13f9ece 060/316: add tests for nesting anaphoric macros.
Date: Mon, 15 Feb 2021 15:57:26 -0500 (EST)

branch: externals/dash
commit 13f9eceb60bade94316b195b46baa0947306fcc7
Author: Zachary Kanfer <zkanfer@gmail.com>
Commit: Zachary Kanfer <zkanfer@gmail.com>

    add tests for nesting anaphoric macros.
---
 dev/examples.el | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/dev/examples.el b/dev/examples.el
index 6e3a2ad..09b8262 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -803,7 +803,23 @@ new list."
     (--> "def" (concat "abc" it "ghi") (upcase it)) => "ABCDEFGHI"
     (--> "def" (concat "abc" it "ghi") upcase) => "ABCDEFGHI"
     (--> "def" upcase) => "DEF"
-    (--> 3 (car (list it))) => 3)
+    (--> 3 (car (list it))) => 3
+
+    (--> '(1 2 3 4) (--map (1+ it) it)) => '(2 3 4 5)
+    (--map (--> it (1+ it)) '(1 2 3 4)) => '(2 3 4 5)
+
+    (--filter (--> it (equal 0 (mod it 2))) '(1 2 3 4)) => '(2 4)
+    (--> '(1 2 3 4) (--filter (equal 0 (mod it 2)) it)) => '(2 4)
+
+    (--annotate (--> it (< 1 it)) '(0 1 2 3)) => '((nil . 0)
+                                                   (nil . 1)
+                                                   (t . 2)
+                                                   (t . 3))
+
+    (--> '(0 1 2 3) (--annotate (< 1 it) it)) => '((nil . 0)
+                                                   (nil . 1)
+                                                   (t . 2)
+                                                   (t . 3)))
 
   (defexamples -as->
     (-as-> 3 my-var (1+ my-var) (list my-var) (mapcar (lambda (ele) (* 2 ele)) 
my-var)) => '(8)



reply via email to

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