From clojure/core.clj :
(defn replicate
"Returns a lazy seq of n xs."
[n x] (take n (repeat x)))
--
Albert Cardona
http://albert.rierol.net
Right. Why not add a version of replicate that just takes x and have
it create an infinite, lazy sequence? Then repeat could go away.
--
R. Mark Volkmann
Object Computing, Inc.
Or replicate could go away.
More likely, I think one of them could take multiple arities and make
the other obsolete.
+1 from me, for what it's worth.
(repeat obj) and (repeat n obj) look good.
--Chouser