Created
January 12, 2010 00:49
-
-
Save tcrayford/274767 to your computer and use it in GitHub Desktop.
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
; Answers http://www.rubyquiz.com/quiz76.html | |
(defn text-munger [string] | |
(for [word (re-split #"\s" string)] | |
(if (> (count word) 3) | |
(let [start (first word) | |
end (last word)] | |
(str start (reduce str (shuffle (drop 1 (take (- (count word) 1) word)))) | |
end)) word))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment