Kaya 0.5.3 reference for Array::intersperse

List of functions and data types in Array

[a] intersperse(a sep, [a] xs)

Arguments

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]
kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya