This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# Riffle

 Rifflegives . Rifflegives . Riffleyields a list in which every n element is x. Riffleyields a list in which x appears if possible at positions , , , ... , .
• If there are fewer than gaps between in Riffle, the are used cyclically.
• The specification is of the type used in Take. Negative indices count from the end of the list.
• In Riffle, if list and xlist are of the same length, then their elements are directly interleaved, so that the last element of the result is the last element of xlist.
Riffle between successive elements in a list:
Riffle in and cyclically:
Riffle in at every 3 position:
Riffle between successive elements in a list:
 Out[1]=

Riffle in and cyclically:
 Out[1]=

Riffle in at every 3 position:
 Out[1]=
 Scope   (7)
Riffle in at every other position:
Include at the beginning and end:
Use step 3:
Start riffling in only at position 5:
Cyclically riffle in and :
Intersperse two lists:
Riffle works on SparseArray objects:
 Applications   (5)
Insert spaces between words:
Create a directory name from a path list:
Insert 0s between successive integers:
Alternate positive and negative integers:
Insert commas at every 4 character:
Riffle is related to Transpose:
New in 6