branch: externals/dash commit 3e7163a24e40730f47dc631f4bae3f151c419596 Author: Matus Goljer <matus.gol...@gmail.com> Commit: Matus Goljer <matus.gol...@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'."