Changes for clojure.core/repeat

john.r.woodward on Tue, 24 Jul 2012
user=> (take 5 (repeat "x"))
("x" "x" "x" "x" "x")

;; which is the same as:
user=> (repeat 5 "x")
("x" "x" "x" "x" "x")

;; It should be noted that repeat simply repeats the value n number of times.
;; If you wish to execute a function to calculate the value each time you 
;; probably want the repeatedly function.

zkim on Sun, 26 Sep 2010
user=> (take 5 (repeat "x"))
("x" "x" "x" "x" "x")

;; which is the same as:
user=> (repeat 5 "x")

;; It should be noted that repeat simply repeats the value n number of times.
;; If you wish to execute a function to calculate the value each time you 
;; probably want the repeatedly function.
gstamp on Wed, 14 Jul 2010
(take 5 (repeat "x"))


Results in:

("x" "x" "x" "x" "x")

which is the same as:


(repeat 5 "x")


It should be noted that repeat simply repeats the value n number of times.  If you wish to execute a function to calculate the value each time you probably want the repeatedly function.