Here is a more direct translation with type hints: (with-open [r (new java.io.BufferedReader (new java.io.FileReader "words.txt"))] (sort-by #(.toLowerCase #^String %) (mapcat #(.split #^String % " ") (line-seq r))))
With the obvious advantage of not reading the file as a string. Regards, Tim. On May 22, 2:48 am, Timothy Pratley <timothyprat...@gmail.com> wrote: > >http://fupeg.blogspot.com/2009/05/javaone-talk-word-sort.htmlhttp://f... > (sort-by #(.toLowerCase %) (.split (slurp "words.txt") " ") --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---