From: Matt Birkholz Date: Fri, 21 Jul 2017 01:02:08 +0000 (-0700) Subject: devops: Fix version-comparator. X-Git-Tag: mit-scheme-pucked-9.2.12~104 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a58e3ce68f68b2e421f819f6431b82a90d5f5a0c;p=mit-scheme.git devops: Fix version-comparator. --- diff --git a/src/devops/devops.scm b/src/devops/devops.scm index cd46a03ec..cceddbd03 100644 --- a/src/devops/devops.scm +++ b/src/devops/devops.scm @@ -707,20 +707,21 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (version-comparator < >) (named-lambda (version-compare v1 v2) - (cond ((eq? #f v1) - #t) - ((eq? #f v2) - #f) - ((null? v2) - #f) - ((null? v1) ;; and (pair? v2) - #t) - ((< (car v1) (car v2)) - #t) - ((> (car v1) (car v2)) - #f) - (else - (version (car v1) (car v2)) + #f) + (else + (loop (cdr v1) (cdr v2))))))) (define (->version string) (and string