This flips the arguments but not the predicate. This can be fixed by flipping the predicate, or removing the statement from the document.
Given that I’ve been using this implementation for many years, and this is the first time I noticed the problem, it might be simpler to remove the statement.
Since the order is also specified for lset= I don't think we should change this, and simply consider it a bug in the reference implementation, which can be fixed with:(and (%lset2<= = s1 s2)
(every (lambda (y) (find-tail (lambda (x) (= x y)) s1)) s2))
(define (lset= = . lists)(check-arg procedure? = lset=)(or (not (pair? lists)) ; 0-ary case(let lp ((s1 (car lists)) (rest (cdr lists)))(or (not (pair? rest))(let ((s2 (car rest))(rest (cdr rest)))(and (or (eq? s1 s2) ; Fast path(and (%lset2<= = s1 s2) ; Real test(every (lambda (y)(find-tail (lambda (x) (= x y)) s1))s2)))(lp s2 rest)))))))