Skip to content

Instantly share code, notes, and snippets.

@Raynes
Forked from daveray/p86.clj
Created November 4, 2011 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raynes/1338786 to your computer and use it in GitHub Desktop.
Save Raynes/1338786 to your computer and use it in GitHub Desktop.
4clojure problem 86 issue
; http://www.4clojure.com/problem/86
(fn [n]
(letfn [(ds [n]
(if (pos? n)
(conj (ds (int (/ n 10))) (mod n 10))))]
(loop [n n nss #{}]
(cond
(nss n) false
(= 1 n) true
:e (recur (->> (ds n) (map #(* % %)) (reduce +)) (conj nss n))))))
;java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment