Skip to content

Instantly share code, notes, and snippets.

@TimoFreiberg
Created September 5, 2018 08:54
Show Gist options
  • Save TimoFreiberg/c8aab13d06a2c7c4fa8ca7815a0ce79a to your computer and use it in GitHub Desktop.
Save TimoFreiberg/c8aab13d06a2c7c4fa8ca7815a0ce79a to your computer and use it in GitHub Desktop.
clojure random lower case alphanumeric string
(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