Created
January 24, 2014 14:17
-
-
Save martintrojer/8598081 to your computer and use it in GitHub Desktop.
random-char-seq
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
(defn random-char-seq [] | |
(let [digits (range 48 58) | |
lower-case (range 65 91) | |
upper-case(range 97 123)] | |
(repeatedly ƒ(rand-nth (map char (concat digits lower-case upper-case)))))) | |
(apply str (take 60 (random-char-seq))) | |
=> "m9MSE2YVIZn8kjY6omvct7iQvOf1YMBILIOxsMcXguvN0uipqtvLcPvJXsTl" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment