Skip to main content

Riffle

Riffle[{e1,e2,…},x] gives {e1,x,e2,x,…}. 

Riffle[{e1,e2,…},{x1,x2,…}] gives {e1,x1,e2,x2,…}.

Riffle[list,x,n] yields a list in which every nth element is x.

Riffle[list,x,{imin,imax,n}] yields a list in which x appears if possible at positions imin, imin+n, imin+2n, … , imax.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.