function | since v0.0-927 | clojure.core/repeat | Edit |
(repeat x)
(repeat n x)
Returns a lazy sequence of x
s.
The length of the sequence is infinite, or n
if provided.
Returns a lazy (infinite!, or length n if supplied) sequence of xs.
(defn repeat
([x] (Repeat. nil -1 x nil nil))
([n x] (if (pos? n)
(Repeat. nil n x nil nil)
(.-EMPTY List))))