Bug 9082 – Add "interleave" function

Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-27T04:05:00Z
Last change time
2016-04-28T14:21:25Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2012-11-27T04:05:05Z
int[] arr = [1, 2, 3].join(0); // fail Expected: [1, 0, 2, 0, 3] This should work with any separator type if it's the element type of the range.
Comment #1 by andrej.mitrovich — 2012-11-27T15:36:29Z
Changed summary. 'join' doesn't work in the way I thought it was, what I'm looking for is something different, an "interleave" type of function.
Comment #2 by jack — 2016-04-05T00:28:17Z
std.range.roundRobin( [1, 2, 3], 0.repeat(2) );
Comment #3 by jack — 2016-04-28T14:21:25Z