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

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

[elpa] externals/dash 2ecc073 316/439: Reorder the partition examples to


From: Phillip Lord
Subject: [elpa] externals/dash 2ecc073 316/439: Reorder the partition examples to follow more logical order, add tests
Date: Tue, 04 Aug 2015 20:29:36 +0000

branch: externals/dash
commit 2ecc07323903132d220433e5da72a07c90fb8fa7
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>

    Reorder the partition examples to follow more logical order, add tests
---
 README.md       |   28 ++++++++++++++--------------
 dev/examples.el |   18 +++++++++---------
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index 1af9122..5ce272e 100644
--- a/README.md
+++ b/README.md
@@ -101,9 +101,9 @@ Operations dual to reductions, building lists from seed 
value rather than consum
 * [-split-when](#-split-when-fn-list) `(fn list)`
 * [-separate](#-separate-pred-list) `(pred list)`
 * [-partition](#-partition-n-list) `(n list)`
-* [-partition-all-in-steps](#-partition-all-in-steps-n-step-list) `(n step 
list)`
-* [-partition-in-steps](#-partition-in-steps-n-step-list) `(n step list)`
 * [-partition-all](#-partition-all-n-list) `(n list)`
+* [-partition-in-steps](#-partition-in-steps-n-step-list) `(n step list)`
+* [-partition-all-in-steps](#-partition-all-in-steps-n-step-list) `(n step 
list)`
 * [-partition-by](#-partition-by-fn-list) `(fn list)`
 * [-partition-by-header](#-partition-by-header-fn-list) `(fn list)`
 * [-group-by](#-group-by-fn-list) `(fn list)`
@@ -819,15 +819,15 @@ those items are discarded.
 (-partition 3 '(1 2 3 4 5 6 7)) ;; => '((1 2 3) (4 5 6))
 ```
 
-#### -partition-all-in-steps `(n step list)`
+#### -partition-all `(n list)`
 
-Returns a new list with the items in `list` grouped into `n-`sized sublists at 
offsets `step` apart.
-The last groups may contain less than `n` items.
+Returns a new list with the items in `list` grouped into `n-`sized sublists.
+The last group may contain less than `n` items.
 
 ```cl
-(-partition-all-in-steps 2 1 '(1 2 3 4)) ;; => '((1 2) (2 3) (3 4) (4))
-(-partition-all-in-steps 3 2 '(1 2 3 4)) ;; => '((1 2 3) (3 4))
-(-partition-all-in-steps 3 2 '(1 2 3 4 5)) ;; => '((1 2 3) (3 4 5) (5))
+(-partition-all 2 '(1 2 3 4 5 6)) ;; => '((1 2) (3 4) (5 6))
+(-partition-all 2 '(1 2 3 4 5 6 7)) ;; => '((1 2) (3 4) (5 6) (7))
+(-partition-all 3 '(1 2 3 4 5 6 7)) ;; => '((1 2 3) (4 5 6) (7))
 ```
 
 #### -partition-in-steps `(n step list)`
@@ -842,15 +842,15 @@ those items are discarded.
 (-partition-in-steps 3 2 '(1 2 3 4 5)) ;; => '((1 2 3) (3 4 5))
 ```
 
-#### -partition-all `(n list)`
+#### -partition-all-in-steps `(n step list)`
 
-Returns a new list with the items in `list` grouped into `n-`sized sublists.
-The last group may contain less than `n` items.
+Returns a new list with the items in `list` grouped into `n-`sized sublists at 
offsets `step` apart.
+The last groups may contain less than `n` items.
 
 ```cl
-(-partition-all 2 '(1 2 3 4 5 6)) ;; => '((1 2) (3 4) (5 6))
-(-partition-all 2 '(1 2 3 4 5 6 7)) ;; => '((1 2) (3 4) (5 6) (7))
-(-partition-all 3 '(1 2 3 4 5 6 7)) ;; => '((1 2 3) (4 5 6) (7))
+(-partition-all-in-steps 2 1 '(1 2 3 4)) ;; => '((1 2) (2 3) (3 4) (4))
+(-partition-all-in-steps 3 2 '(1 2 3 4)) ;; => '((1 2 3) (3 4))
+(-partition-all-in-steps 3 2 '(1 2 3 4 5)) ;; => '((1 2 3) (3 4 5) (5))
 ```
 
 #### -partition-by `(fn list)`
diff --git a/dev/examples.el b/dev/examples.el
index 220e846..61a1365 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -326,11 +326,10 @@
     (-partition 2 '(1 2 3 4 5 6 7)) => '((1 2) (3 4) (5 6))
     (-partition 3 '(1 2 3 4 5 6 7)) => '((1 2 3) (4 5 6)))
 
-  (defexamples -partition-all-in-steps
-    (-partition-all-in-steps 2 1 '(1 2 3 4)) => '((1 2) (2 3) (3 4) (4))
-    (-partition-all-in-steps 3 2 '(1 2 3 4)) => '((1 2 3) (3 4))
-    (-partition-all-in-steps 3 2 '(1 2 3 4 5)) => '((1 2 3) (3 4 5) (5))
-    (-partition-all-in-steps 2 1 '(1)) => '((1)))
+  (defexamples -partition-all
+    (-partition-all 2 '(1 2 3 4 5 6)) => '((1 2) (3 4) (5 6))
+    (-partition-all 2 '(1 2 3 4 5 6 7)) => '((1 2) (3 4) (5 6) (7))
+    (-partition-all 3 '(1 2 3 4 5 6 7)) => '((1 2 3) (4 5 6) (7)))
 
   (defexamples -partition-in-steps
     (-partition-in-steps 2 1 '(1 2 3 4)) => '((1 2) (2 3) (3 4))
@@ -338,10 +337,11 @@
     (-partition-in-steps 3 2 '(1 2 3 4 5)) => '((1 2 3) (3 4 5))
     (-partition-in-steps 2 1 '(1)) => '())
 
-  (defexamples -partition-all
-    (-partition-all 2 '(1 2 3 4 5 6)) => '((1 2) (3 4) (5 6))
-    (-partition-all 2 '(1 2 3 4 5 6 7)) => '((1 2) (3 4) (5 6) (7))
-    (-partition-all 3 '(1 2 3 4 5 6 7)) => '((1 2 3) (4 5 6) (7)))
+  (defexamples -partition-all-in-steps
+    (-partition-all-in-steps 2 1 '(1 2 3 4)) => '((1 2) (2 3) (3 4) (4))
+    (-partition-all-in-steps 3 2 '(1 2 3 4)) => '((1 2 3) (3 4))
+    (-partition-all-in-steps 3 2 '(1 2 3 4 5)) => '((1 2 3) (3 4 5) (5))
+    (-partition-all-in-steps 2 1 '(1)) => '((1)))
 
   (defexamples -partition-by
     (-partition-by 'even? '()) => '()



reply via email to

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