Repeating a List

Can you repeat a list N times?

E.g. [1,2,3] repeated 2 times is [1,2,3,1,2,3]

Here’s one. Credit to another user (I don’t remember whom) for concatenating a list. I just added the modular math part to repeatedly use the indices for the original list.

https://www.desmos.com/calculator/g8g9h9blsn

1 Like

Copy paste this:
r_{ep}\left(n_{umber},l_{ist}\right)=\sum_{k=\left[1…n_{umber}\cdot\operatorname{length}\left(l_{ist}\right)\right]}^{\left[1…n_{umber}\cdot\operatorname{length}\left(l_{ist}\right)\right]}l_{ist}\left[\operatorname{mod}\left(k-1,\operatorname{length}\left(l_{ist}\right)\right)+1\right]

Since then, if you don’t need to repeat too many times, you can just use join( ):

L=[1,2,3]
R=join(L,L,L,L,L)