[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 2ecc073 316/426: Reorder the partition examples to
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 2ecc073 316/426: Reorder the partition examples to follow more logical order, add tests |
Date: |
Tue, 04 Aug 2015 19:38:33 +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? '()) => '()
- [elpa] externals/dash e6cae0b 279/426: Merge pull request #68 from rejeep/list-function, (continued)
- [elpa] externals/dash e6cae0b 279/426: Merge pull request #68 from rejeep/list-function, Phillip Lord, 2015/08/04
- [elpa] externals/dash f18a520 326/426: Release 2.7.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7eb8307 283/426: Merge pull request #71 from Fuco1/find-last-index, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7f0fadc 317/426: Add -prodfn, Phillip Lord, 2015/08/04
- [elpa] externals/dash 960b05f 276/426: Set -each, -each-while and -dotimes indent levels to 1., Phillip Lord, 2015/08/04
- [elpa] externals/dash d948086 315/426: Add -iteratefn, Phillip Lord, 2015/08/04
- [elpa] externals/dash a09a4b2 318/426: Add code markup for docstrings and fix erroneous whitespace in docstring, Phillip Lord, 2015/08/04
- [elpa] externals/dash 38307e3 223/426: Partition docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash f3b0a55 321/426: Change -predicate-p examples to -predicate? to maintain consistency, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7e4adb5 319/426: Add missing keywords to highlight list, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2ecc073 316/426: Reorder the partition examples to follow more logical order, add tests,
Phillip Lord <=
- [elpa] externals/dash eea928a 320/426: Add -replace, Phillip Lord, 2015/08/04
- [elpa] externals/dash d9879e9 329/426: Release 2.8.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash f8873a0 327/426: Update readme-template with changes from last release, Phillip Lord, 2015/08/04
- [elpa] externals/dash 25c114c 330/426: Implementing a shallow copy counterpart to -clone., Phillip Lord, 2015/08/04
- [elpa] externals/dash f257fb9 328/426: Add -butlast, Phillip Lord, 2015/08/04
- [elpa] externals/dash 174747e 323/426: Add -splice and -splice-list, Phillip Lord, 2015/08/04
- [elpa] externals/dash ab99be6 335/426: Add -fix, Phillip Lord, 2015/08/04
- [elpa] externals/dash b1e585d 337/426: Update copyright notice, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3adad97 334/426: Add -non-nil, Phillip Lord, 2015/08/04
- [elpa] externals/dash 166bccd 333/426: Add -tree-map-nodes, Phillip Lord, 2015/08/04