From 7881268ac70d6091a2edf7ac8d81a40bee2aadbc Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Tue, 6 Oct 2015 09:30:43 +0100 Subject: [PATCH] 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..aceff8b 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))