Logo

Programming-Idioms

History of Idiom 143 > diff from v1 to v2

Edit summary for version 2 by BBaz:
[D] remove null sentinel

Version 1

2016-08-14, 20:16:13

Version 2

2016-08-14, 20:16:27

Idiom #143 Iterate altenatively over two lists

Iterate alternatively over the elements of the list items1 and items2. For each iteration, print the element.

Idiom #143 Iterate altenatively over two lists

Iterate alternatively over the elements of the list items1 and items2. For each iteration, print the element.

Imports
import std.range;
import std.algorithm.iteration;
import std.stdio;
Imports
import std.range;
import std.algorithm.iteration;
import std.stdio;
Code
roundRobin(items1, items2).each!writeln;�
Code
roundRobin(items1, items2).each!writeln;
Doc URL
https://dlang.org/phobos/std_range.html#roundRobin
Doc URL
https://dlang.org/phobos/std_range.html#roundRobin
Demo URL
https://dpaste.dzfl.pl/3870ee68f2e7
Demo URL
https://dpaste.dzfl.pl/3870ee68f2e7