Created
September 6, 2016 20:48
-
-
Save dosbol/3b07e6a3e28817a1c578b6503791ff8e to your computer and use it in GitHub Desktop.
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
(def input "xyzzy | yzzy | |
afbbbfjdjklgdfdhfdkjfffhhfffjkdfhdhkyejejfjkd | dhfdkjfffhhfffjkdfhd | |
bartarcarracecarbartar | racecar | |
3.1415926535897932384626433832795028841971 | 46264") | |
(defn polindrome? [x] | |
(= (reverse s) (seq s))) | |
(defn splt [s] | |
(clojure.string/split s #"\n| | ")) | |
(->> input | |
(splt) | |
(filter polindrome?) | |
(sort-by count) | |
(last)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment