Skip to content

Instantly share code, notes, and snippets.

@dbasch
Created November 30, 2012 16:45
Show Gist options
  • Save dbasch/4176894 to your computer and use it in GitHub Desktop.
Save dbasch/4176894 to your computer and use it in GitHub Desktop.
(ns closearch.words
(:use [clojure.string :only (split)]))
(def dict (split (slurp "/usr/share/dict/words") #"\n"))
(defn -main[& args]
(dotimes [n (#(Integer/parseInt %) (first args))]
(spit (str "text/file." n) (apply str (interpose " " (take 5000 (shuffle dict)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment