Closed GuillemGongora closed 3 years ago
Ah that is a nice suggestions! Currently a way to do this is:
ring vals [1 2 3 4]
ring reps lace(vals vals vals vals)
print vals
//=> [ 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 ]
But this is not really useful and actually more typing than, haha
ring reps fill(1 4 2 4 3 4 4 4)
Perfect! But it's a problem when working with big complex rings like:
ring offsets spreadInclusiveFloat(16 0.945 0.985)
ring offsets invert(offsets)
ring offsets lace(offsets offsets offsets offsets)
Cannot do this with fill()
Yeah exactly. Added it to my to do list for the total-serialism package: https://github.com/tmhglnd/total-serialism/issues
Now included in e105a4eebdaa2f6f39342545822dc7ef44bf5c85 as repeat()
Add new generative ring method similar to fill() that repeats every value in a ring a certain amount of times. ring abc (1 2 3 4) -> (1 2 3 4) ring cba newMethod(abc 4) -> (1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4)