;these two functions are equivalent user=> (take 5 (repeatedly #(rand-int 11))) (6 6 3 9 8) user=> (repeatedly 5 #(rand-int 11)) (1 8 6 9 6) ;compare with repeat user=> (repeat 5 (int (rand 100))) (94 94 94 94 94)
;these two functions are equivalent user=> (take 5 (repeatedly #(rand-int 11))) (6 6 3 9 8) user=> (repeatedly 5 #(rand-int 11)) (1 8 6 9 6) ;compare with repeat user=> (repeat 5 (int (rand 100))) (94 94 94 94 94)
;these two functions are equivalent user=> (take 5 (repeatedly #(rand-int 11))) (6 6 3 9 8) user=> (repeatedly 5 #(rand-int 11)) (1 8 6 9 6) user=> (repeat 5 (int (rand 100))) (94 94 94 94 94)
;these two functions are equivalent user=> (take 5 (repeatedly #(rand-int 11))) (6 6 3 9 8) user=> (repeatedly 5 #(rand-int 11)) (1 8 6 9 6)
;these two functions are equivalent user=> (take 5 (repeatedly (rand-int 11))) (6 6 3 9 8) user=> (repeatedly 5 (rand-int 11)) (1 8 6 9 6)
user=> (take 5 (repeatedly rand)) (0.28233245109488236 0.08030128492085076 0.15643150415380813 0.9694232922352649 0.8376353399589436) user=> (repeatedly 5 rand) (0.838780918706331 0.8748473230330858 0.7268033361577966 0.878411753745249 0.010476948294672606)
user=> (take 5 (repeatedly rand)) (0.28233245109488236 0.08030128492085076 0.15643150415380813 0.9694232922352649 0.8376353399589436) user=> (repeatedly 5 rand) (0.838780918706331 0.8748473230330858 0.7268033361577966 0.878411753745249 0.010476948294672606)
user=> (take 5 (repeatedly rand)) (0.28233245109488236 0.08030128492085076 0.15643150415380813 0.9694232922352649 0.8376353399589436) user=> (repeatedly 5 rand) (0.838780918706331 0.8748473230330858 0.7268033361577966 0.878411753745249 0.010476948294672606) user=>
(take 5 (repeatedly rand)) (0.28233245109488236 0.08030128492085076 0.15643150415380813 0.9694232922352649 0.8376353399589436)