x - Replicate
Tags: array , number , vectorize
This atom is dyadic, which means it takes two arguments.
Repeat each element of
y times. Vectorizes at depth 1 on the left and then vectorizes between the elements.
y must be a list of only numbers or a number, otherwise an error will occur. This repeats each element of
x in-place, so
1,2,3,4 x 2,1,3,2 returns
[1, 1, 2, 3, 3, 3, 4, 4]. If the right argument consists of only
1, this works to apply a boolean mask to a list.