            (map inc)
            (reduce *)))
 
-(defn palindrome? [n]
+(defn palindrome?
   "**palindrome? :: Int -> Bool**
-	Checks whether the given number n is a palindrome.
-	Uses reversed string comparison"
-  (= (str n) (clojure.string/reverse (str n))))
-
-(defn least-common-multiple [input]
+  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
   "**least-common-multiple :: [Int] -> Int**
   Computes the smallest number divisible by all of the given input numbers."
+  [input]
   (->> input
        (map #(frequencies (get-primes %)))
        (apply merge-with max)

           ;; 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)))))


      ;; no match - next iteration
     :else (get-primes n (rest ps) acc))))

(defn max-prime
  "**max-prime :: Int, [Int] -> Int**
  Given a number n and a list of prime numbers ps, returns the largest prime factor of n."
  [n ps]
  (let [div (first ps)] ;; local variable - head of prime list
    (cond
      ;; termination - found max prime
      (= n div) div
