Created
September 5, 2018 08:54
-
-
Save TimoFreiberg/c8aab13d06a2c7c4fa8ca7815a0ce79a to your computer and use it in GitHub Desktop.
clojure random lower case alphanumeric string
This file contains hidden or 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
(def alphanumeric "0123456789abcdefghijklmnopqrstuvwxyz") | |
(defn rand-alphanumeric | |
[len] | |
(apply str (take len (repeatedly #(rand-nth alphanumeric))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment