On Fri, May 25, 2012 at 6:16 PM, Don Green <infodeveloper...@gmail.com> wrote: > Given the output of Racket's read-words/line function, which produces a list > of lists. Each word is in a list, each group of words on a line is in a > list, all within a list. > > Any ideas on how to sort on the car (first element) of each list that > corresponds to a line?
(define (sort-line line) (sort line (λ (a b) (or (null? a) (and (not (null? b)) (string<? (first a) (first b))))))) ____________________ Racket Users list: http://lists.racket-lang.org/users