(define $lexical-compare (lambda [$xs $ys] (match [xs ys] [(list ordering) (list ordering)] {[[ ] ] [[ _] ] [[_ ] ] [[ ] (lexical-compare xs' ys')] [[ ] (compare x y)]}))) (define $lexical-compare (lambda [$xs $ys] (match [xs ys] [(list ordering) (list ordering)] {[(loop $i [1 _] {[ ] @...} (& ![ ] [$xs' $ys'])) (match [xs' ys'] [(list ordering) (list ordering)] {[[ ] ] [[ _] ] [[_ ] ] [[ ] (compare x y)]})]})))