emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dash 3e7163a 020/316: [#99] Use butlast to implement -b


From: ELPA Syncer
Subject: [elpa] externals/dash 3e7163a 020/316: [#99] Use butlast to implement -butlast
Date: Mon, 15 Feb 2021 15:57:16 -0500 (EST)

branch: externals/dash
commit 3e7163a24e40730f47dc631f4bae3f151c419596
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: Matus Goljer <matus.goljer@gmail.com>

    [#99] Use butlast to implement -butlast
---
 dash.el | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/dash.el b/dash.el
index 3e4c5e1..87983fd 100644
--- a/dash.el
+++ b/dash.el
@@ -555,11 +555,8 @@ Alias: `-any'"
 
 (defun -butlast (list)
   "Return a list of all items in list except for the last."
-  (let (result)
-    (while (cdr list)
-      (!cons (car list) result)
-      (!cdr list))
-    (nreverse result)))
+  ;; no alias as we don't want magic optional argument
+  (butlast list))
 
 (defmacro --count (pred list)
   "Anaphoric form of `-count'."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]