[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? '()) => '()
- [elpa] externals/dash fb51f8f 304/439: Merge pull request #88 from steventlamb/topic/zip_cycle_pad, (continued)
- [elpa] externals/dash fb51f8f 304/439: Merge pull request #88 from steventlamb/topic/zip_cycle_pad, Phillip Lord, 2015/08/04
- [elpa] externals/dash 00549e4 307/439: Add missing fontification keywords, Phillip Lord, 2015/08/04
- [elpa] externals/dash cd137e0 310/439: `-slice` should not fill the returned list with nils if to > length, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6b64ea7 303/439: Add functions for flexibly zipping uneven lists, Phillip Lord, 2015/08/04
- [elpa] externals/dash 63ec298 308/439: Merge pull request #92 from Fuco1/outer-product, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7185db8 311/439: [Issue #83] Add `step` to `-slice`, Phillip Lord, 2015/08/04
- [elpa] externals/dash a3021eb 313/439: Merge pull request #93 from lunaryorn/patch-1, Phillip Lord, 2015/08/04
- [elpa] externals/dash 624c501 306/439: Add `-table` and `-table-flat`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0384eee 312/439: Improve Travis CI configuration, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3132ae0 314/439: Alias -tail to nthcdr, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2ecc073 316/439: Reorder the partition examples to follow more logical order, add tests,
Phillip Lord <=
- [elpa] externals/dash bbc1d9c 309/439: `--each-while` should also expose `it-index`, Phillip Lord, 2015/08/04
- [elpa] externals/dash d948086 315/439: Add -iteratefn, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7f0fadc 317/439: Add -prodfn, Phillip Lord, 2015/08/04
- [elpa] externals/dash eea928a 320/439: Add -replace, Phillip Lord, 2015/08/04
- [elpa] externals/dash f3b0a55 321/439: Change -predicate-p examples to -predicate? to maintain consistency, Phillip Lord, 2015/08/04
- [elpa] externals/dash a09a4b2 318/439: Add code markup for docstrings and fix erroneous whitespace in docstring, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7e4adb5 319/439: Add missing keywords to highlight list, Phillip Lord, 2015/08/04
- [elpa] externals/dash 174747e 323/439: Add -splice and -splice-list, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5637bd6 322/439: Add alias from -find to -first, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9ebcce6 325/439: Add some niceties to font-locking of examples, Phillip Lord, 2015/08/04