Skip to content

Instantly share code, notes, and snippets.

@velveteer
Last active November 10, 2015 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velveteer/c7b63b1ee5b97cb10217 to your computer and use it in GitHub Desktop.
Save velveteer/c7b63b1ee5b97cb10217 to your computer and use it in GitHub Desktop.
(ns longestlines)
(use 'clojure.string)
(let [files (map #(trim %) (split (slurp (first *command-line-args*)) #"\n"))]
(println (join "\n" (take (Integer. (first files)) (sort-by count > files)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment