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-209-ga19b88b


From: Chris K. Jester-Young
Subject: [Guile-commits] GNU Guile branch, srfi-41, updated. v2.0.7-209-ga19b88b
Date: Tue, 19 Mar 2013 18:26:56 +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=a19b88beb016cb3dacdb8962165b599c5743c167

The branch, srfi-41 has been updated
       via  a19b88beb016cb3dacdb8962165b599c5743c167 (commit)
      from  a703d83f5bfb324f601b096b5aab1b50e6715541 (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 a19b88beb016cb3dacdb8962165b599c5743c167
Author: Chris K. Jester-Young <address@hidden>
Date:   Tue Mar 19 14:25:57 2013 -0400

    Implement yet more feedback from Mark H. Weaver.
    
    * module/srfi/srfi-41.scm (stream-car, stream-cdr): Enable a fast
      path where if the type is what we expect, we skip additional type
      checks.

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

Summary of changes:
 module/srfi/srfi-41.scm |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/module/srfi/srfi-41.scm b/module/srfi/srfi-41.scm
index 314127e..91d2c67 100644
--- a/module/srfi/srfi-41.scm
+++ b/module/srfi/srfi-41.scm
@@ -106,13 +106,15 @@
   (stream-eager (make-stream-pare (stream-delay obj) (stream-lazy strm))))
 
 (define (stream-car strm)
-  (must stream? strm 'stream-car "non-stream")
-  (must-not stream-null? strm 'stream-car "null stream")
+  (unless (stream-pair? strm)
+    (must stream? strm 'stream-car "non-stream")
+    (must-not stream-null? strm 'stream-car "null stream"))
   (stream-force (stream-kar (stream-force strm))))
 
 (define (stream-cdr strm)
-  (must stream? strm 'stream-cdr "non-stream")
-  (must-not stream-null? strm 'stream-cdr "null stream")
+  (unless (stream-pair? strm)
+    (must stream? strm 'stream-cdr "non-stream")
+    (must-not stream-null? strm 'stream-cdr "null stream"))
   (stream-kdr (stream-force strm)))
 
 (define-syntax-rule (stream-lambda formals body0 body1 ...)


hooks/post-receive
-- 
GNU Guile



reply via email to

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