I want to take a sequence or vector and create an infinite, looping, lazy version. This is what I tried:
(def test-seq '(1 2 3)) (take 5 (repeat test-seq))
And I got
((1 2 3) (1 2 3) (1 2 3) (1 2 3) (1 2 3))
When I wanted to
(1 2 3 1 2)
I know it works
(take 5 (flatten (repeat test-seq)))
but it seems a little unsatisfactory and flabby. I suppose sequence restructuring is expensive, but I could be wrong :)
source share