Skip to content

Commit

Permalink
Avoid hitting the standard < symbol, for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
axch committed May 25, 2013
1 parent 66e75b6 commit 21f25c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions simplifiers.scm
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,11 @@
(,symbol? . ,symbol<?)
(,list? . ,list<?))))

(define (sorted? lst <)
;; Specifically, I am testing that a stable sort of lst by < will
(define (sorted? lst <?)
;; Specifically, I am testing that a stable sort of lst by <? will
;; not change anything, that is, that there are no reversals where a
;; later item is < an earlier one.
;; later item is <? an earlier one.
(cond ((not (pair? lst)) #t)
((not (pair? (cdr lst))) #t)
((< (cadr lst) (car lst)) #f)
(else (sorted? (cdr lst) <))))
((<? (cadr lst) (car lst)) #f)
(else (sorted? (cdr lst) <?))))

0 comments on commit 21f25c8

Please sign in to comment.