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

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

[elpa] externals/dash bbc1d9c 309/426: `--each-while` should also expose


From: Phillip Lord
Subject: [elpa] externals/dash bbc1d9c 309/426: `--each-while` should also expose `it-index`
Date: Tue, 04 Aug 2015 19:38:30 +0000

branch: externals/dash
commit bbc1d9c0c7485be8342b5b4c165abe8dbb5fe21e
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>

    `--each-while` should also expose `it-index`
---
 dash.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dash.el b/dash.el
index 4e214d0..41aea86 100644
--- a/dash.el
+++ b/dash.el
@@ -78,10 +78,12 @@ special values."
   (let ((l (make-symbol "list"))
         (c (make-symbol "continue")))
     `(let ((,l ,list)
-           (,c t))
+           (,c t)
+           (it-index 0))
        (while (and ,l ,c)
          (let ((it (car ,l)))
            (if (not ,pred) (setq ,c nil) ,@body))
+         (setq it-index (1+ it-index))
          (!cdr ,l)))))
 
 (defun -each-while (list pred fn)



reply via email to

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