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

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

[elpa] master 46bfe80 3/4: Allow non list bindings in async-let.


From: Thierry Volpiatto
Subject: [elpa] master 46bfe80 3/4: Allow non list bindings in async-let.
Date: Thu, 3 Nov 2016 18:45:07 +0000 (UTC)

branch: master
commit 46bfe80d1d0c0ba6cf1a4593b55af11cd943c697
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>

    Allow non list bindings in async-let.
    
    * async.el (async--fold-left): Also make arguments name more meaningful.
---
 async.el |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/async.el b/async.el
index c7dabe2..0bb45fa 100644
--- a/async.el
+++ b/async.el
@@ -298,10 +298,13 @@ returns nil.  It can still be useful, however, as an 
argument to
   "Evaluate FUNC in a separate Emacs process, synchronously."
   `(async-get (async-start ,func)))
 
-(defun async--fold-left (f z xs)
-  (let ((res z))
-    (dolist (x xs)
-      (setq res (funcall f res x)))
+(defun async--fold-left (fn forms bindings)
+  (let ((res forms))
+    (dolist (binding bindings)
+      (setq res (funcall fn res
+                         (if (listp binding)
+                             binding
+                             (list binding)))))
     res))
 
 (defmacro async-let (bindings &rest forms)



reply via email to

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