Changeset 14147 in project


Ignore:
Timestamp:
04/07/09 06:07:51 (11 years ago)
Author:
Kon Lovett
Message:

Save.

Location:
release/4/srfi-41/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/srfi-41/trunk/streams-primitive.scm

    r14144 r14147  
    9999     ($stream-eager$ ($make-stream-pare$ ($stream-delay$ OBJ) ($stream-lazy$ STRM))) ) ) )
    100100
    101 (define (stream-pair? obj) (and (stream? obj) (stream-pare? (%stream-force obj))))
     101(define (stream-pair? obj)
     102#;(print 'stream-pair? " " obj " " (%stream-force obj))
     103  (and (stream? obj) (stream-pare? (%stream-force obj))) )
    102104
    103105(define (checked-stream-pair loc obj)
    104   (or (and (stream? obj) (let ((val (%stream-force obj))) (and (stream-pare? val) val)))
     106#;(print 'checked-stream-pair " " obj " " (%stream-force obj))
     107  (or (and-let* (((stream? obj))
     108                  (val (%stream-force obj))
     109                  ((stream-pare? val)))
     110        val)
    105111      (##sys#signal-hook #:type-error loc "bad argument type - expected a stream-pair" obj)) )
    106112
  • release/4/srfi-41/trunk/tests/run.scm

    r14144 r14147  
    2424    ((tester descrip expr result)
    2525      (handle-exceptions exp
    26 (begin (print exp)
    27 (string-append
    28            (symbol->string (or ((condition-property-accessor 'exn 'location) exp) 'unknown))
     26          (string-append
     27           (symbol->string ((condition-property-accessor 'exn 'location) exp))
    2928           ": "
    3029           ((condition-property-accessor 'exn 'message) exp))
    31 )
    3230        (unless (equal? expr result)
    3331          (newline) (display "failed tester: ") (display descrip) (newline)
     
    186184  ; stream-for-each
    187185  (tester (stream-for-each "four" strm123) "stream-for-each: non-procedural argument")
    188   (tester (stream-for-each display) "stream-for-each: no stream arguments")
     186  #;(tester (stream-for-each display) "stream-for-each: no stream arguments")
    189187  (tester (stream-for-each display "four") "stream-for-each: non-stream argument")
    190188  (tester (let ((sum 0)) (stream-for-each (lambda (x) (set! sum (+ sum x))) strm123) sum) 6)
     
    218216  ; stream-map
    219217  (tester (stream-map "four" strm123) "stream-map: non-procedural argument")
    220   (tester (stream-map odd?) "stream-map: no stream arguments")
     218  #;(tester (stream-map odd?) "stream-map: no stream arguments")
    221219  (tester (stream-map odd? "four") "stream-map: non-stream argument")
    222220  (tester (stream->list (stream-map - strm123)) '(-1 -2 -3))
     
    324322
    325323  ; stream-zip
    326   (tester (stream-zip) "stream-zip: no stream arguments")
     324  #;(tester (stream-zip) "stream-zip: no stream arguments")
    327325  (tester (stream-zip "four") "stream-zip: non-stream argument")
    328326  (tester (stream-zip strm123 "four") "stream-zip: non-stream argument")
Note: See TracChangeset for help on using the changeset viewer.