Last active
May 3, 2016 06:35
-
-
Save GregorStocks/e2adeafb44757c857edc7d01c724aedc to your computer and use it in GitHub Desktop.
extranapkins.clj
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 extranapkin [s] | |
(let [n (number->words (count (string/split s #" ")))] | |
(str "I've got " n " words for you: " s))) | |
(defn extranapkins [x] | |
(loop [so-far "Fuck off" | |
i 1] | |
(if (> i x) | |
so-far | |
(recur (extranapkin so-far) (inc i))))) | |
(defn -main [& args] | |
(println (extranapkins 109))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment