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

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

[elpa] externals/dash 47af4d6 265/439: Merge pull request #61 from Fuco1


From: Phillip Lord
Subject: [elpa] externals/dash 47af4d6 265/439: Merge pull request #61 from Fuco1/master
Date: Tue, 04 Aug 2015 20:28:51 +0000

branch: externals/dash
commit 47af4d6cc542bb3fe4cc8e5e27b387f5d4387287
Merge: 094fdea c788474
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>

    Merge pull request #61 from Fuco1/master
    
    Fix bug with nested lists in `-remove-at-indices`
---
 dash.el         |    2 +-
 dev/examples.el |   10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dash.el b/dash.el
index bab597a..1eab3eb 100644
--- a/dash.el
+++ b/dash.el
@@ -524,7 +524,7 @@ from INDICES."
         (!cons (car split) r)
         (setq list (cdr (cadr split)))))
     (!cons list r)
-    (-flatten (nreverse r))))
+    (apply '-concat (nreverse r))))
 
 (defmacro --split-with (pred list)
   "Anaphoric form of `-split-with'."
diff --git a/dev/examples.el b/dev/examples.el
index a222b23..db71ca9 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -108,7 +108,9 @@
   (-remove-at 2 '("0" "1" "2" "3" "4" "5")) => '("0" "1" "3" "4" "5")
   (-remove-at 3 '("0" "1" "2" "3" "4" "5")) => '("0" "1" "2" "4" "5")
   (-remove-at 4 '("0" "1" "2" "3" "4" "5")) => '("0" "1" "2" "3" "5")
-  (-remove-at 5 '("0" "1" "2" "3" "4" "5")) => '("0" "1" "2" "3" "4"))
+  (-remove-at 5 '("0" "1" "2" "3" "4" "5")) => '("0" "1" "2" "3" "4")
+  (-remove-at 5 '((a b) (c d) (e f g) h i ((j) k) l (m))) => '((a b) (c d) (e 
f g) h i l (m))
+  (-remove-at 0 '(((a b) (c d) (e f g) h i ((j) k) l (m)))) => nil)
 
 (defexamples -remove-at-indices
   (-remove-at-indices '(0) '("0" "1" "2" "3" "4" "5")) => '("1" "2" "3" "4" 
"5")
@@ -124,7 +126,11 @@
   (-remove-at-indices '(2) '("0" "1" "2" "3" "4" "5")) => '("0" "1" "3" "4" 
"5")
   (-remove-at-indices '(3) '("0" "1" "2" "3" "4" "5")) => '("0" "1" "2" "4" 
"5")
   (-remove-at-indices '(4) '("0" "1" "2" "3" "4" "5")) => '("0" "1" "2" "3" 
"5")
-  (-remove-at-indices '(5) '("0" "1" "2" "3" "4" "5")) => '("0" "1" "2" "3" 
"4"))
+  (-remove-at-indices '(5) '("0" "1" "2" "3" "4" "5")) => '("0" "1" "2" "3" 
"4")
+  (-remove-at-indices '(1 2 4) '((a b) (c d) (e f g) h i ((j) k) l (m))) => 
'((a b) h ((j) k) l (m))
+  (-remove-at-indices '(5) '((a b) (c d) (e f g) h i ((j) k) l (m))) => '((a 
b) (c d) (e f g) h i l (m))
+  (-remove-at-indices '(0) '(((a b) (c d) (e f g) h i ((j) k) l (m)))) => nil
+  (-remove-at-indices '(2 3) '((0) (1) (2) (3) (4) (5) (6))) => '((0) (1) (4) 
(5) (6)))
 
 (def-example-group "Reductions" nil
   (defexamples -reduce-from



reply via email to

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