[Pkg-gnupg-commit] [gnupg2] 70/180: gpgscm: Generalize 'for-each-p'.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Sat Dec 24 22:29:09 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit a2bedc8ac6fcdcd1de0a9fa3d540006481387dff
Author: Justus Winter <justus at g10code.com>
Date: Thu Dec 8 15:39:05 2016 +0100
gpgscm: Generalize 'for-each-p'.
* tests/gpgscm/tests.scm (for-each-p): Generalize to N lists like
for-each.
(for-each-p'): Likewise.
Signed-off-by: Justus Winter <justus at g10code.com>
---
tests/gpgscm/tests.scm | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index e2b38f5..bd51819 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -77,17 +77,18 @@
(flush-stdio)))
(set! *progress-nesting* (- *progress-nesting* 1)))
-(define (for-each-p msg proc lst)
- (for-each-p' msg proc (lambda (x) x) lst))
+(define (for-each-p msg proc lst . lsts)
+ (apply for-each-p' `(,msg ,proc ,(lambda (x . xs) x) ,lst , at lsts)))
-(define (for-each-p' msg proc fmt lst)
+(define (for-each-p' msg proc fmt lst . lsts)
(call-with-progress
msg
(lambda (progress)
- (for-each (lambda (a)
- (progress (fmt a))
- (proc a))
- lst))))
+ (apply for-each
+ `(,(lambda args
+ (progress (apply fmt args))
+ (apply proc args))
+ ,lst , at lsts)))))
;; Process management.
(define CLOSED_FD -1)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list