Wolfram: Riffle (Add at Every Nth)
Riffle. (Intersperse. Add at Every Nth)
Riffle-
Riffle[ list, x ]Riffle[ list, x, n ]Riffle[ list, list2 ]
intersperse x into the list, at every nth (default 2). Or intersperse 2 lists list, list2 .
Riffle[ {1, 2, 3}, x ] (* {1, x, 2, x, 3} *) Riffle[ {1, 2, 3}, x, 2 ] (* {1, x, 2, x, 3} *) Riffle[ {1, 2, 3, 4, 5, 6}, x, 3 ] (* {1, 2, x, 3, 4, x, 5, 6} *)
Riffle[ {1, 2, 3}, {a, b, c} ] (* {1, a, 2, b, 3, c} *)
Wolfram. List Operations, and Loop, Iteration, Recursion
- Wolfram: List Operations
- Wolfram: List. Table (Create List, Nested Array)
- Wolfram: Range (Create Flat List)
- Wolfram: List. Get Element by Index (Part, Take, Drop, First, Last, Most, Rest)
- Wolfram: Extract (Get Element by Position)
- Wolfram: List. Add Element
- Wolfram: List. Delete Element
- Wolfram: List. Change Element
- Wolfram: List. Check Exist, Count
- Wolfram: List. Position (Get Positions of Elements by Pattern)
- Wolfram: List. Join, Union, Intersection, Difference
- Wolfram: List. Min, Max
- Wolfram: List. Select (Filter)
- Wolfram: List. Sort Reverse Ordering
- Wolfram: Flatten
- Wolfram: Riffle (Add at Every Nth)
- Wolfram: RotateLeft
- Wolfram: Padding
- Wolfram: List. Partition, Reshape, Split, Gather
- Wolfram: Transpose
- Wolfram: List. Same Items Counts, Tally, Group
- Wolfram: List. Combinatorics
- Wolfram: Iteration
- Wolfram: Map Function to List
- Wolfram: Scan (foreach)
- Wolfram: Nest, FixedPoint (Recursion)
- Wolfram: Fold (reduce)
- Wolfram: Loop