Created
June 20, 2019 21:01
-
-
Save kocubinski/e5f1d7b0f8199235d3d7cfa4d9e1fbfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns moon-moon.core | |
(:require [clojure.java.io :as io] | |
[clojure.string :as str])) | |
(defn rand-words | |
[] | |
(with-open [reader (io/reader "/usr/share/dict/words")] | |
(->> (line-seq reader) | |
(filter (partial re-matches #"[a-z]{0,7}")) | |
(partial rand-nth) | |
(repeatedly 2) | |
(str/join "-")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generate random word combinations for fun and profit!