From 72b4138d0fd1f314f9129ea1bf54f67892e25d38 Mon Sep 17 00:00:00 2001 From: Jim Ursetto Date: Mon, 18 Jun 2012 20:16:24 -0500 Subject: [PATCH] Ensure that srfi-13 string= and its string-comparison friends return booleans on success --- srfi-13.scm | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/srfi-13.scm b/srfi-13.scm index 615cbb7..e4a0509 100644 --- a/srfi-13.scm +++ b/srfi-13.scm @@ -783,7 +783,7 @@ (or (and (eq? s1 s2) (= start1 start2)) ; Fast path (%string-compare s1 start1 end1 s2 start2 end2 ; Real test (lambda (i) #f) - values + (lambda (i) (if i #t #f)) (lambda (i) #f)))))) (define (string<> s1 s2 . maybe-starts+ends) @@ -792,9 +792,9 @@ (or (not (= (- end1 start1) (- end2 start2))) ; Fast path (and (not (and (eq? s1 s2) (= start1 start2))) ; Quick filter (%string-compare s1 start1 end1 s2 start2 end2 ; Real test - values + (lambda (i) (if i #t #f)) (lambda (i) #f) - values))))) + (lambda (i) (if i #t #f))))))) (define (string< s1 s2 . maybe-starts+ends) (let-string-start+end2 (start1 end1 start2 end2) @@ -803,7 +803,7 @@ (< end1 end2) (%string-compare s1 start1 end1 s2 start2 end2 ; Real test - values + (lambda (i) (if i #t #f)) (lambda (i) #f) (lambda (i) #f))))) @@ -816,7 +816,7 @@ (%string-compare s1 start1 end1 s2 start2 end2 ; Real test (lambda (i) #f) (lambda (i) #f) - values)))) + (lambda (i) (if i #t #f)))))) (define (string<= s1 s2 . maybe-starts+ends) (let-string-start+end2 (start1 end1 start2 end2) @@ -825,8 +825,8 @@ (<= end1 end2) (%string-compare s1 start1 end1 s2 start2 end2 ; Real test - values - values + (lambda (i) (if i #t #f)) + (lambda (i) (if i #t #f)) (lambda (i) #f))))) (define (string>= s1 s2 . maybe-starts+ends) @@ -837,8 +837,8 @@ (%string-compare s1 start1 end1 s2 start2 end2 ; Real test (lambda (i) #f) - values - values)))) + (lambda (i) (if i #t #f)) + (lambda (i) (if i #t #f)))))) (define (string-ci= s1 s2 . maybe-starts+ends) (let-string-start+end2 (start1 end1 start2 end2) @@ -847,7 +847,7 @@ (or (and (eq? s1 s2) (= start1 start2)) ; Fast path (%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test (lambda (i) #f) - values + (lambda (i) (if i #t #f)) (lambda (i) #f)))))) (define (string-ci<> s1 s2 . maybe-starts+ends) @@ -856,9 +856,9 @@ (or (not (= (- end1 start1) (- end2 start2))) ; Fast path (and (not (and (eq? s1 s2) (= start1 start2))) ; Quick filter (%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test - values + (lambda (i) (if i #t #f)) (lambda (i) #f) - values))))) + (lambda (i) (if i #t #f))))))) (define (string-ci< s1 s2 . maybe-starts+ends) (let-string-start+end2 (start1 end1 start2 end2) @@ -867,7 +867,7 @@ (< end1 end2) (%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test - values + (lambda (i) (if i #t #f)) (lambda (i) #f) (lambda (i) #f))))) @@ -880,7 +880,7 @@ (%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test (lambda (i) #f) (lambda (i) #f) - values)))) + (lambda (i) (if i #t #f)))))) (define (string-ci<= s1 s2 . maybe-starts+ends) (let-string-start+end2 (start1 end1 start2 end2) @@ -889,8 +889,8 @@ (<= end1 end2) (%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test - values - values + (lambda (i) (if i #t #f)) + (lambda (i) (if i #t #f)) (lambda (i) #f))))) (define (string-ci>= s1 s2 . maybe-starts+ends) @@ -901,8 +901,8 @@ (%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test (lambda (i) #f) - values - values)))) + (lambda (i) (if i #t #f)) + (lambda (i) (if i #t #f)))))) ;;; Hash -- 1.7.6.1