Skip to content

Instantly share code, notes, and snippets.

@kmyokoyama
Created January 4, 2022 02:37
Show Gist options
  • Save kmyokoyama/bb4c96d066ce1d8b1c2ac33eaecce0e4 to your computer and use it in GitHub Desktop.
Save kmyokoyama/bb4c96d066ce1d8b1c2ac33eaecce0e4 to your computer and use it in GitHub Desktop.
(->> (.ints (java.util.Random.) 10000 3 6)
.iterator
iterator-seq
(map (fn [n] (clojure.string/join (repeatedly n #(.charAt "abcdefghijklmnopqrstuvwxyz0123456789" (.nextInt (java.util.Random.) 36))))))
(filter (fn [s] (= s (clojure.string/reverse s))))
count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment