 (ns euler.helper)
 
 (defn factor?
-  "*Int, Int -> Bool*
+  "**factor? :: Int, Int -> Bool**:
   Predicate that tests whether the divisor evenly divides the dividend."
   [dividend divisor] (zero? (mod dividend divisor)))
 
 (defn factor-any
-  "*[Int] -> Int -> Bool*
+  "**factor-any :: [Int] -> (Int -> Bool)**:
   Returns a predicate that tests whether its argument
   can be evenly divided by any of the divisors."
   [& divisors]

                      (reduce nth grid yx))))))

(def primes
  "*[Int]*
  Lazy stream of prime numbers, generated by the sieve of Eratosthenes algorithm.
  Internally stores in a hastable the next composite number corresponding to the prime number.
  Taken from http://voidmainargs.blogspot.de/2010/12/lazy-sieve-eratosthenes-in-scala-and.html"

              (inc (memo-collatz c (next-collatz n))))
            n)))

(defn parse-grid [grid-str dimension]
  "**parse-grid :: String -> [[Int]]**
  Converts a string into a dimension x dimension vector of integers."
  (vec (map vec (partition dimension (map #(Integer. %) (.split grid-str "\\s+"))))))

(defn product
