stretch list (anything), count (number)
Stretches a list of values each value repeated count times. Always returns a ring regardless of the type of the list that is stretched. To preserve type, consider using .stretch
i.e. (ramp 1, 2, 3).stretch(2) #=> (ramp 1, 1, 2, 2, 3, 3)
Introduced in v2.6
# Example 1 | |
|
|
# Example 2 | |
|
|