Skip to content

Instantly share code, notes, and snippets.

@stingh711
Created September 4, 2012 08:32
Show Gist options
  • Select an option

  • Save stingh711/3618530 to your computer and use it in GitHub Desktop.

Select an option

Save stingh711/3618530 to your computer and use it in GitHub Desktop.
Project euler issue 4 solution in clojure
(defn reverse-str
[s]
(apply str (reverse s)))
(defn palindromic?
[n]
(let [s (str n)]
(= (reverse-str s) s)))
(apply max (filter palindromic? (for [x (range 100 1000) y (range 100 1000)] (* x y))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment