@@ -19,18 +19,19 @@ If you want the function combinators, then also:
1919
2020Add this to the big comment block at the top:
2121
22- ;; Package-Requires: ((dash "2.16 .0"))
22+ ;; Package-Requires: ((dash "2.17 .0"))
2323
2424To get function combinators:
2525
26- ;; Package-Requires: ((dash "2.16 .0") (dash-functional "1.2.0") (emacs "24"))
26+ ;; Package-Requires: ((dash "2.17 .0") (dash-functional "1.2.0") (emacs "24"))
2727
2828## Upcoming breaking change!
2929
3030- For backward compatibility reasons ` -zip ` return a cons-cell instead of a list
3131 with two elements when called on two lists. This is a clunky API, and in an
3232 upcoming 3.0 release of Dash it will always return a list. If you rely on the
33- cons-cell return value, use ` -zip-pair ` instead.
33+ cons-cell return value, use ` -zip-pair ` instead. During the 2.x
34+ release cycle the new API is available as ` -zip-lists ` .
3435
3536## Syntax highlighting of dash functions
3637
@@ -233,6 +234,7 @@ Other list functions not fit to be classified elsewhere.
233234* [ -interleave] ( #-interleave-rest-lists ) ` (&rest lists) `
234235* [ -zip-with] ( #-zip-with-fn-list1-list2 ) ` (fn list1 list2) `
235236* [ -zip] ( #-zip-rest-lists ) ` (&rest lists) `
237+ * [ -zip-lists] ( #-zip-lists-rest-lists ) ` (&rest lists) `
236238* [ -zip-fill] ( #-zip-fill-fill-value-rest-lists ) ` (fill-value &rest lists) `
237239* [ -unzip] ( #-unzip-lists ) ` (lists) `
238240* [ -cycle] ( #-cycle-list ) ` (list) `
@@ -1729,13 +1731,35 @@ groupings are equal to the length of the shortest input list.
17291731If two lists are provided as arguments, return the groupings as a list
17301732of cons cells. Otherwise, return the groupings as a list of lists.
17311733
1732- Please note! This distinction is being removed in an upcoming 3.0
1733- release of Dash. If you rely on this behavior, use -zip-pair instead.
1734+ Use [ ` -zip-lists ` ] ( #-zip-lists-rest-lists ) if you need the return value to always be a list
1735+ of lists.
1736+
1737+ Alias: ` -zip-pair `
1738+
1739+ See also: [ ` -zip-lists ` ] ( #-zip-lists-rest-lists )
17341740
17351741``` el
17361742(-zip '(1 2 3) '(4 5 6)) ;; => '((1 . 4) (2 . 5) (3 . 6))
17371743(-zip '(1 2 3) '(4 5 6 7)) ;; => '((1 . 4) (2 . 5) (3 . 6))
1738- (-zip '(1 2 3 4) '(4 5 6)) ;; => '((1 . 4) (2 . 5) (3 . 6))
1744+ (-zip '(1 2) '(3 4 5) '(6)) ;; => '((1 3 6))
1745+ ```
1746+
1747+ #### -zip-lists ` (&rest lists) `
1748+
1749+ Zip ` lists ` together. Group the head of each list, followed by the
1750+ second elements of each list, and so on. The lengths of the returned
1751+ groupings are equal to the length of the shortest input list.
1752+
1753+ The return value is always list of lists, which is a difference
1754+ from ` -zip-pair ` which returns a cons-cell in case two input
1755+ lists are provided.
1756+
1757+ See also: [ ` -zip ` ] ( #-zip-rest-lists )
1758+
1759+ ``` el
1760+ (-zip-lists '(1 2 3) '(4 5 6)) ;; => '((1 4) (2 5) (3 6))
1761+ (-zip-lists '(1 2 3) '(4 5 6 7)) ;; => '((1 4) (2 5) (3 6))
1762+ (-zip-lists '(1 2) '(3 4 5) '(6)) ;; => '((1 3 6))
17391763```
17401764
17411765#### -zip-fill ` (fill-value &rest lists) `
@@ -1759,11 +1783,15 @@ a variable number of arguments, such that
17591783
17601784is identity (given that the lists are the same length).
17611785
1786+ Note in particular that calling this on a list of two lists will
1787+ return a list of cons-cells such that the aboce identity works.
1788+
17621789See also: [ ` -zip ` ] ( #-zip-rest-lists )
17631790
17641791``` el
17651792(-unzip (-zip '(1 2 3) '(a b c) '("e" "f" "g"))) ;; => '((1 2 3) (a b c) ("e" "f" "g"))
17661793(-unzip '((1 2) (3 4) (5 6) (7 8) (9 10))) ;; => '((1 3 5 7 9) (2 4 6 8 10))
1794+ (-unzip '((1 2) (3 4))) ;; => '((1 . 3) (2 . 4))
17671795```
17681796
17691797#### -cycle ` (list) `
@@ -2879,6 +2907,14 @@ Change `readme-template.md` or `examples-to-docs.el` instead.
28792907
28802908## Changelist
28812909
2910+ ### From 2.16 to 2.17
2911+
2912+ - Speed up ` -uniq ` by using hash-tables when possible (@cireu , #305 )
2913+ - Fix ` -inits ` to be non-destructive (@SwiftLawnGnome , #313 )
2914+ - Fix indent rules for ` -some-> ` and family (@wbolster , #321 )
2915+ - Add ` -zip-lists ` which always returns list of lists, even for two
2916+ input lists (see issue #135 ).
2917+
28822918### From 2.15 to 2.16
28832919
28842920- Added ` --doto ` , anaphoric version of ` -doto ` (#282 )
0 commit comments