diff --git a/build-aux/bootstrap/rebirth/relibprebirth.scm b/build-aux/bootstrap/rebirth/relibprebirth.scm index c0f110e..d1fc688 100644 --- a/build-aux/bootstrap/rebirth/relibprebirth.scm +++ b/build-aux/bootstrap/rebirth/relibprebirth.scm @@ -71,9 +71,9 @@ (define (= x y) (string->es "+$$x === +$$y")) (define (> x y) - (string->es "+$$y > +$$x")) + (string->es "+$$x > +$$y")) (define (< x y) - (string->es "+$$y < +$$x")) + (string->es "+$$x < +$$y")) ;; warning: doesn't verify that it's a pair (define (length xs) @@ -120,7 +120,7 @@ (string->es "Array.isArray($$xs)")) (define (pair? xs) (and (list? xs) - (> 0 (length xs)))) + (not (zero? (length xs))))) ;; R7RS string (define (substring s start end) @@ -129,8 +129,6 @@ (string->es "$$s.length")) (define (string=? s1 s2) (string->es "typeof $$s1 === 'string' && $$s1 === $$s2")) - (define (string-ref s i) - (string->es "$$s[$$i] || $$error(`value out of range: ${$$i}`)")) (define (string-append . xs) (string->es "$$xs.join('')"))