ajmorgan
10/20/2014 - 5:32 PM

cons and lazy-seq

cons and lazy-seq

(defn even-numbers
  ([] (even-numbers 0))
  ([n] (cons n (lazy-seq (even-numbers (+ n 2))))))