[Top][All Lists]

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

[elpa] externals/dash 98a82ca 142/426: DRY up -repeat with --dotimes

From: Phillip Lord
Subject: [elpa] externals/dash 98a82ca 142/426: DRY up -repeat with --dotimes
Date: Tue, 04 Aug 2015 19:37:16 +0000

branch: externals/dash
commit 98a82caea2341ebe88579743611086287747224e
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>

    DRY up -repeat with --dotimes
 dash.el |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dash.el b/dash.el
index 540aff1..715add3 100644
--- a/dash.el
+++ b/dash.el
@@ -593,8 +593,7 @@ or with `-compare-fn' if that's non-nil."
   "Return a list with X repeated N times.
 Returns nil if N is less than 1."
   (let ((ret nil))
-    (while (not (minusp (setq n (1- n))))
-      (!cons x ret))
+    (--dotimes n (!cons x ret))
 (eval-after-load "lisp-mode"

reply via email to

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