From 346a6e4bd5a12d6a438a73fca19a6b2b13f0fe74 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 4 Jun 2020 22:48:17 -0400 Subject: [PATCH] Issue #369 - Switch over to multi-arg string cmp --- scheme/base.sld | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scheme/base.sld b/scheme/base.sld index acead90f..ced2bb93 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -605,14 +605,12 @@ (define (char>=? c1 c2 . cs) (Cyc-bin-op-char >= c1 (cons c2 cs))) ; TODO: char-ci predicates (in scheme/char library) + (define (string=? str1 str2 . strs) (Cyc-bin-op fast-string=? str1 (cons str2 strs))) + (define (string? str1 str2 . strs) (Cyc-bin-op fast-string>? str1 (cons str2 strs))) + (define (string>=? str1 str2 . strs) (Cyc-bin-op fast-string>=? str1 (cons str2 strs))) -; ; TODO: generalize to multiple arguments: (define (string? str1 str2) (> (string-cmp str1 str2) 0)) - (define (string>=? str1 str2) (>= (string-cmp str1 str2) 0)) (define (fast-string=? str1 str2) (equal? (string-cmp str1 str2) 0)) (define (fast-string