[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 096f244 018/316: --remove-last does not modify inp
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash 096f244 018/316: --remove-last does not modify input list #158 |
Date: |
Mon, 15 Feb 2021 15:57:16 -0500 (EST) |
branch: externals/dash
commit 096f244187dcd02f4157df4c2067d5e6e3c7e4cf
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: Matus Goljer <matus.goljer@gmail.com>
--remove-last does not modify input list #158
---
dash.el | 2 +-
dev/examples.el | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dash.el b/dash.el
index f310563..7c8ed69 100644
--- a/dash.el
+++ b/dash.el
@@ -270,7 +270,7 @@ See also: `-remove', `-map-first'"
Alias: `-reject-last'
See also: `-remove', `-map-last'"
- (nreverse (-remove-first pred (nreverse list))))
+ (nreverse (-remove-first pred (reverse list))))
(defmacro --remove-last (form list)
"Anaphoric form of `-remove-last'."
diff --git a/dev/examples.el b/dev/examples.el
index 06bc58f..7fa8528 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -131,7 +131,10 @@ new list."
(defexamples -remove-last
(-remove-last 'even? '(1 3 5 4 7 8 10 11)) => '(1 3 5 4 7 8 11)
(-remove-last 'stringp '(1 2 "last" "second" "third")) => '(1 2 "last"
"second")
- (--remove-last (> it 3) '(1 2 3 4 5 6 7 8 9 10)) => '(1 2 3 4 5 6 7 8 9))
+ (--remove-last (> it 3) '(1 2 3 4 5 6 7 8 9 10)) => '(1 2 3 4 5 6 7 8 9)
+ ;; the next two tests assert that the input list is not modified #158
+ (let ((l '(1 2 3))) (list (--remove-last (< it 2) l) l)) => '((2 3) (1 2
3))
+ (let ((l '(1 2 3))) (list (--remove-last (< it 4) l) l)) => '((1 2) (1 2
3)))
(defexamples -remove-item
(-remove-item 3 '(1 2 3 2 3 4 5 3)) => '(1 2 2 4 5)
- [elpa] externals/dash b6e1041 010/316: Fix broken GH profile link in README, (continued)
- [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
- [elpa] externals/dash 7b2845a 011/316: Fix broken GH profile link in README, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 096f244 018/316: --remove-last does not modify input list #158,
ELPA Syncer <=
- [elpa] externals/dash 3e7163a 020/316: [#99] Use butlast to implement -butlast, ELPA Syncer, 2021/02/15
- [elpa] externals/dash eef3bb0 023/316: Document -doto macro in the README (#181), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 7cc0149 021/316: [#99] Add -take-last and -drop-last, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 6d8abc7 022/316: Add -doto macro (like Clojure's doto) (#177), ELPA Syncer, 2021/02/15
- [elpa] externals/dash f1c60c4 034/316: Merge pull request #193 from GuiltyDolphin/fix-map-when-typo, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 15f384d 025/316: Copyedit: argument name consistency (#187), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 937f8a1 026/316: Update documentation, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 012b3bc 024/316: Docstrings grammar fixes (#186), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 6ded2f2 014/316: Add 'see also' to `-find-index` and `-find-last-index`., ELPA Syncer, 2021/02/15
- [elpa] externals/dash e680ad0 015/316: Merge pull request #173 from Wilfred/master, ELPA Syncer, 2021/02/15