      (factor? num (first ps)) (prime-factors (/ num (first ps)) (conj factors (first ps)) ps)
      :else (prime-factors num factors (rest ps)))))
 
-(defn palindrome?
-  "*Int -> Bool*
+(defn palindrome? [n]
+  "**palindrome? :: Int -> Bool**
 	Checks whether the given number n is a palindrome.
 	Uses reversed string comparison"
-  [n] (= (str n) (clojure.string/reverse (str n))))
-
-(defn least-common-multiple
-  "*[Int] -> Int*
-	Computes the smallest number divisible by all of the given input numbers."
-  [input]
+  (= (str n) (clojure.string/reverse (str n))))
+
+(defn least-common-multiple [input]
+  "**least-common-multiple :: [Int] -> Int**
+  Computes the smallest number divisible by all of the given input numbers."
   (->> input
        (map #(frequencies (get-primes %)))
        (apply merge-with max)

           ;; by (fac(n))^2
           (Math/pow (factorial n) 2))))

(defn triangle
  "*Int -> Int*
  Computes the nth triangle number.
  A triangle number is generated by adding the natural numbers up to n.
  Shortcut using Gauss technique."
  [n] (/ (* n (inc n)) 2))

(defn proper-divisors
  "Returns the list of proper divisors of n, excluding n."
  [n] (take-while #(not= n %) (factors n)))

(def fibs
  "*(Int)*
  Lazy sequence of all Fibonacci numbers. Using BigIntegers."
  (lazy-cat [0N 1N] (map + (rest fibs) fibs)))

(defn next-collatz
  [n] (if (even? n) (bit-shift-right n 1) (inc (* 3 n))))

(defn collatz
  "Lazy seq of Collatz sequence of n."
  [n] (cons n
        (if (= n 1) '()
            (collatz (next-collatz n)))))


  "The Golden Ratio - (1+sqrt5)/2."
  (/ (inc (Math/sqrt 5)) 2))

(defn digits [n]
  "**digits :: Int -> [Int]**
  Converts a number n into a list of its digits."
  (map #(Character/digit % 10) (str n)))

(defn narcissistic? [n exp]
  "A number written as the sum of its nth powers.
  Exp.: 1634 = 1^4 + 6^4 + 3^4 + 4^4."
  (->> (digits n)
       (map #(Math/pow % exp))
       (reduce +)
