Created
March 1, 2016 08:36
-
-
Save jooyunghan/88a129b15b48f914b31f to your computer and use it in GitHub Desktop.
Look-and-say sequence in Clojure using Lazy sequence
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
(defn nn [s] (->> s (partition-by identity) (mapcat (juxt count first)))) | |
(defn ant [] (iterate nn [1])) | |
(-> (ant) (nth 1000000) (nth 1000000)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.