Skip to content

Instantly share code, notes, and snippets.

@rdsr
Created November 16, 2010 05:02
Show Gist options
  • Save rdsr/701448 to your computer and use it in GitHub Desktop.
Save rdsr/701448 to your computer and use it in GitHub Desktop.
(defn amicable? [a]
(if (@amicable-nos a) true
(let [b (d a)
db (d b)]
(if (and (not= a b) (= a db))
(do (swap! amicable-nos assoc b true) true)
false))))
(def amicable-nos (atom {}))
(swap! an-atom f & args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment