guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, srfi-41, updated. v2.0.7-208-ga703d83


From: Chris K. Jester-Young
Subject: [Guile-commits] GNU Guile branch, srfi-41, updated. v2.0.7-208-ga703d83
Date: Tue, 19 Mar 2013 12:40:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=a703d83f5bfb324f601b096b5aab1b50e6715541

The branch, srfi-41 has been updated
       via  a703d83f5bfb324f601b096b5aab1b50e6715541 (commit)
      from  c33f45bef09523bea1545845c41cc6eb9068d6ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a703d83f5bfb324f601b096b5aab1b50e6715541
Author: Chris K. Jester-Young <address@hidden>
Date:   Tue Mar 19 08:39:00 2013 -0400

    Implement more feedback from Mark H. Weaver.
    
    * module/srfi/srfi-41.scm (must, must-not, must-every): Implement
      these as direct macros, and without using negate.

-----------------------------------------------------------------------

Summary of changes:
 module/srfi/srfi-41.scm |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/module/srfi/srfi-41.scm b/module/srfi/srfi-41.scm
index 45b03ad..314127e 100644
--- a/module/srfi/srfi-41.scm
+++ b/module/srfi/srfi-41.scm
@@ -44,23 +44,20 @@
 
 ;;; Private supporting functions and macros.
 
-(define-syntax-rule (must-not1 pred obj func msg args)
-  (when (pred obj)
-    (throw 'wrong-type-arg func msg args (list obj))))
-
-(define-syntax-rule (must-not* pred objs func msg args)
-  (let ((flunk (filter pred objs)))
+(define-syntax-rule (must pred obj func msg args ...)
+  (let ((item obj))
+    (unless (pred item)
+      (throw 'wrong-type-arg func msg (list args ...) (list item)))))
+
+(define-syntax-rule (must-not pred obj func msg args ...)
+  (let ((item obj))
+    (when (pred item)
+      (throw 'wrong-type-arg func msg (list args ...) (list item)))))
+
+(define-syntax-rule (must-every pred objs func msg args ...)
+  (let ((flunk (remove pred objs)))
     (unless (null? flunk)
-      (throw 'wrong-type-arg func msg args flunk))))
-
-(define* (must-not pred obj func msg . args)
-  (must-not1 pred obj func msg args))
-
-(define* (must pred obj func msg . args)
-  (must-not1 (negate pred) obj func msg args))
-
-(define* (must-every pred objs func msg . args)
-  (must-not* (negate pred) objs func msg args))
+      (throw 'wrong-type-arg func msg (list args ...) flunk))))
 
 ; Only the one-list version is supported since that's what we use.
 (define (pair-map proc clist)


hooks/post-receive
-- 
GNU Guile



reply via email to

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