rebirth: relibprebirth: Fix < and >
* build-aux/bootstrap/rebirth/relibprebirth.scm (<, >): Reverse comparisons. This is quite the embarassing mess-up. It appears that it was only used in one place, and so I did not notice the problem until I began writing test cases.master
parent
a841f68d4f
commit
6daa3501b6
|
@ -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('')"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue