clodoc » clojure.core/repeat

Returns a lazy (infinite!, or length n if supplied) sequence of xs.
(defn repeat
  "Returns a lazy (infinite!, or length n if supplied) sequence of xs."
  {:added "1.0"
   :static true}
  ([x] (lazy-seq (cons x (repeat x))))
  ([n x] (take n (repeat x))))

Running Clodoc a92beda6 on Clojure 1.3.0
(C) 2010-2011 Jan Stępień
API Issues
Fork me on GitHub