[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash a3cd1ac 004/316: Alias `-zip-pair`, prepare for br
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash a3cd1ac 004/316: Alias `-zip-pair`, prepare for breaking change |
Date: |
Mon, 15 Feb 2021 15:57:13 -0500 (EST) |
branch: externals/dash
commit a3cd1ac209c3927e90b263e5748f9f7ad271bbe1
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Alias `-zip-pair`, prepare for breaking change
See issue #135
---
README.md | 12 +++++++++++-
dash.el | 7 ++++++-
readme-template.md | 7 +++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 15af636..f87124f 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,13 @@ To get function combinators:
;; Package-Requires: ((dash "2.12.0") (dash-functional "1.2.0") (emacs
"24"))
+## Upcoming breaking change!
+
+- For backward compatibility reasons `-zip` return a cons-cell instead of a
list
+ with two elements when called on two lists. This is a clunky API, and in an
+ upcoming 2.0 release of Dash it will always return a list. If you rely on the
+ cons-cell return value, use `-zip-pair` instead.
+
## Syntax highlighting of dash functions
Font lock of dash functions in emacs lisp buffers is now optional.
@@ -1434,7 +1441,10 @@ second elements of each list, and so on. The lengths of
the returned
groupings are equal to the length of the shortest input list.
If two lists are provided as arguments, return the groupings as a list
-of cons cells. Otherwise, return the groupings as a list of lists.
+of cons cells. Otherwise, return the groupings as a list of lists.
+
+Please note! This distinction is being removed in an upcoming 2.0
+release of Dash. If you rely on this behavior, use -zip-pair instead.
```el
(-zip '(1 2 3) '(4 5 6)) ;; => '((1 . 4) (2 . 5) (3 . 6))
diff --git a/dash.el b/dash.el
index 7cb844c..88c4c79 100644
--- a/dash.el
+++ b/dash.el
@@ -1009,7 +1009,10 @@ second elements of each list, and so on. The lengths of
the returned
groupings are equal to the length of the shortest input list.
If two lists are provided as arguments, return the groupings as a list
-of cons cells. Otherwise, return the groupings as a list of lists. "
+of cons cells. Otherwise, return the groupings as a list of lists.
+
+Please note! This distinction is being removed in an upcoming 2.0
+release of Dash. If you rely on this behavior, use -zip-pair instead."
(let (results)
(while (-none? 'null lists)
(setq results (cons (mapcar 'car lists) results))
@@ -1021,6 +1024,8 @@ of cons cells. Otherwise, return the groupings as a list
of lists. "
(--map (cons (car it) (cadr it)) results)
results)))
+(defalias '-zip-pair '-zip)
+
(defun -zip-fill (fill-value &rest lists)
"Zip LISTS, with FILL-VALUE padded onto the shorter lists. The
lengths of the returned groupings are equal to the length of the
diff --git a/readme-template.md b/readme-template.md
index 6d3dbd2..95a7b37 100644
--- a/readme-template.md
+++ b/readme-template.md
@@ -25,6 +25,13 @@ To get function combinators:
;; Package-Requires: ((dash "2.12.0") (dash-functional "1.2.0") (emacs
"24"))
+## Upcoming breaking change!
+
+- For backward compatibility reasons `-zip` return a cons-cell instead of a
list
+ with two elements when called on two lists. This is a clunky API, and in an
+ upcoming 2.0 release of Dash it will always return a list. If you rely on the
+ cons-cell return value, use `-zip-pair` instead.
+
## Syntax highlighting of dash functions
Font lock of dash functions in emacs lisp buffers is now optional.
- [elpa] externals/dash updated (c287454 -> 0e97578), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 277d6ed 002/316: Merge pull request #165 from phillord/fix/table-performance, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 7881268 001/316: Prefer make-list over --map., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 71668fe 003/316: Speed up -table-flat, ELPA Syncer, 2021/02/15
- [elpa] externals/dash a3cd1ac 004/316: Alias `-zip-pair`, prepare for breaking change,
ELPA Syncer <=
- [elpa] externals/dash fec6f54 007/316: Release 2.12.1, ELPA Syncer, 2021/02/15
- [elpa] externals/dash b6e1041 010/316: Fix broken GH profile link in README, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 174187f 005/316: Add lexical binding pragma to dash.el, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 22e494a 008/316: Update MELPA URLs, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 0d84c0f 009/316: Merge pull request #167 from syohex/update-url, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 8a46d3c 013/316: [#170] Add a note about -keep on -filter., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 81b15c5 006/316: Fix: The upcoming breaking change is 3.0, not 2.0, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 6484fb5 012/316: Merge pull request #168 from camsaul/patch-2, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 0272e8b 017/316: [Fix #158] -map-last does not modify input list., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1fce650 019/316: Add `-each-indexed` and an anaphoric equivalent (#178), ELPA Syncer, 2021/02/15