Skip to content

Instantly share code, notes, and snippets.

View lmarinho's full-sized avatar

Lucas Marinho lmarinho

View GitHub Profile
### Keybase proof
I hereby claim:
* I am lmarinho on github.
* I am lmarinho (https://keybase.io/lmarinho) on keybase.
* I have a public key ASAFiBO-LJe3a4RRLo7mcS4z88PoWoX1OSZbbJJueJRUnwo
To claim this, I am signing this object:
(defn digits [n]
(->> n
(iterate #(quot % 10))
(take-while #(> % 0))
(map #(rem % 10))
reverse))
(defn happy-step [n] (->> n digits (map #(* % %)) (reduce +)))
(defn happy-set [n]