[a] intersperse(a sep, [a] xs)
Arguments
sep: The separatorsep: The elements
Usage
Place the separator sep between each element of xs and return the resulting array.
xs = [1,2,3,4];
ys = intersperse(0,xs);
// ys = [1,0,2,0,3,0,4]
sep: The separatorsep: The elementsPlace the separator sep between each element of xs and return the resulting array.
xs = [1,2,3,4];
ys = intersperse(0,xs);
// ys = [1,0,2,0,3,0,4]