   "The Golden Ratio - (1+sqrt5)/2."
   (/ (inc (Math/sqrt 5)) 2))
 
-(defn digits [n]
+(defn digits
   "**digits :: Int -> [Int]**
   Converts a number n into a list of its digits."
-  (map #(Character/digit % 10) (str n)))
-
-(defn narcissistic? [n exp]
+  [n] (map #(Character/digit % 10) (str n)))
+
+(defn narcissistic?
   "A number written as the sum of its nth powers.
   Exp.: 1634 = 1^4 + 6^4 + 3^4 + 4^4."
+  [n exp]
   (->> (digits n)
        (map #(Math/pow % exp))
        (reduce +)

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

(defn triangle [n]
  "**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 (inc n)) 2))

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

(defn next-collatz [n]
  "computes the next number of the collatz sequence."
  (if (even? n) (bit-shift-right n 1) (inc (* 3 n))))

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



(def tens ["twenty" "thirty" "forty" "fifty" "sixty" "seventy" "eighty" "ninety"])

(defn to-words
  "Converts a number (up to 1000) into its string representation, omitting spaces.
  Example: (to-words 115) => 'onehundredandfifteen'."
  [n]
  (cond
    (< n 20) (nth singles (dec n))
    (< n 100) (if (factor? n 10)
