On Wed, Jan 28, 2009 at 6:36 AM, Albert Cardona <sapri...@gmail.com> wrot> > Shawn Hoover wrote: >> Why do we have both repeat and replicate? I can sort of keep them straight, >> but as they only differ by arity I wonder if they can be combined... or if >> I'm missing a subtle reason for separate names. A user in IRC threw out the >> possibility of infinite vs. finite functions, but interleave and map seem to >> blur that line. >> > > From clojure/core.clj : > > (defn replicate > "Returns a lazy seq of n xs." > [n x] (take n (repeat x)))
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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---