     [n]
     (reduce *' (range 1 (inc n))))
 
+(defn gcd
+    [x y]
+    (if (zero? y)
+        x
+        (recur y (mod x y))))
+
 (defn print-factorial
     [input]
     (factorial (Integer/parseInt (subs input 0 (dec (count input))))))

    [input]
    (str input " = " (clojure.string/join " x " (primefactors (Integer/parseInt input)))))

(defn is-number?
    [input]
    (re-matches #"[0-9]+" input))

(defn is-factorial?
    [input]

                          "Good bot" "I know"
                          "Good bot." "I know"
                          (condp
                              (is-number? input)      (print-prime-factors input)
                              (is-two-numbers? input) (print-gcd input)
                              (is-factorial? input)   (print-factorial input)
                                                      (random-message)))]
        (str prefix response)))

(defn on-incoming-message
