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

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

[elpa] externals/dash 7881268 001/316: Prefer make-list over --map.


From: ELPA Syncer
Subject: [elpa] externals/dash 7881268 001/316: Prefer make-list over --map.
Date: Mon, 15 Feb 2021 15:57:12 -0500 (EST)

branch: externals/dash
commit 7881268ac70d6091a2edf7ac8d81a40bee2aadbc
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Prefer make-list over --map.
    
    This is a small performance improvement using the `make-list'
    primitive directly, rather than the more complex use of number-sequence
    and --map.
---
 dash.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dash.el b/dash.el
index 7df2fb0..aceff8b9 100644
--- a/dash.el
+++ b/dash.el
@@ -1078,8 +1078,7 @@ order.  The dimension of the result is (length lists).
 See also: `-table-flat'"
   (let ((restore-lists (copy-sequence lists))
         (last-list (last lists))
-        ;; FIXME: Why not just use (make-list (length lists) nil)?
-        (re (--map nil (number-sequence 1 (length lists)))))
+        (re (make-list (length lists) nil)))
     (while (car last-list)
       (let ((item (apply fn (-map 'car lists))))
         (push item (car re))



reply via email to

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