Returns an iterator which repeatedly calls a function.
The iterator is infinite. Each time it's advanced, it calls (f)
and produces the
result of the call.
Infinite iterators can be converted to finite iterators using take
.
(let n 1)
(let-fn powers ()
(= n (* n 2))
n)
(prn ..(take 4 (repeat-with powers))) ; prints 2 4 8 16