thomasmorle...@gmail.com writes: > To throw in my own 2cts. > > Why not compare strings, looks more straight forward to me. > > (define (calculate-version-harm ref-version) > (cond ((string? ref-version) ref-version) > ((number-list? ref-version) > (string-concatenate (list-join (map number->string ref-version) > "."))) > (else (ly:error "whatever-massage")))) > > (define (version-compare? op v1 v2) > "Compare two versions @var{v1} and @var{v2} with the operator @var{op}. > The operator would typically be > string=?, string<?, string<=? , string>? , string>=? , etc." > (op (calculate-version-harm v1) (calculate-version-harm v2))) > > The issue I can imagine: probably more expensive, especially with > guilev2
Because (string<? "2.18.27" "2.18.4") => #t > https://codereview.appspot.com/317270043/ -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel