Skip to content

Instantly share code, notes, and snippets.

@daveray
Created November 4, 2011 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save daveray/1338452 to your computer and use it in GitHub Desktop.
Save daveray/1338452 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 ns #{}]
(cond
(ns n) false
(= 1 n) true
:e (recur (->> (ds n) (map #(* % %)) (reduce +)) (conj ns 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