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

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

[elpa] externals/dash 3bdf60b 365/439: Add some examples


From: Phillip Lord
Subject: [elpa] externals/dash 3bdf60b 365/439: Add some examples
Date: Tue, 04 Aug 2015 20:30:34 +0000

branch: externals/dash
commit 3bdf60b2a486ce12197c9238c23a1b544533a61c
Author: Fredrik Bergroth <address@hidden>
Commit: Fredrik Bergroth <address@hidden>

    Add some examples
---
 dev/examples.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dev/examples.el b/dev/examples.el
index 75e1918..7e25d16 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -678,6 +678,8 @@ new list."
 
   (defexamples -when-let
     (-when-let (match-index (string-match "d" "abcd")) (+ match-index 2)) => 5
+    (-when-let ((&plist :foo foo) (list :foo "foo")) foo) => "foo"
+    (-when-let ((&plist :foo foo) (list :bar "bar")) foo) => nil
     (--when-let (member :b '(:a :b :c)) (cons :d it)) => '(:d :b :c)
     (--when-let (even? 3) (cat it :a)) => nil)
 
@@ -691,7 +693,8 @@ new list."
 
   (defexamples -if-let*
     (-if-let* ((x 5) (y 3) (z 7)) (+ x y z) "foo") => 15
-    (-if-let* ((x 5) (y nil) (z 7)) (+ x y z) "foo") => "foo")
+    (-if-let* ((x 5) (y nil) (z 7)) (+ x y z) "foo") => "foo"
+    (-if-let* (((_ _ x) '(nil nil 7))) x) => 7)
 
   (defexamples -let
     (-let (([a (b c) d] [1 (2 3) 4])) (list a b c d)) => '(1 2 3 4)



reply via email to

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