selector

Undocumented in source. Be warned that the author may not have intended to support it.
selector
(
Sg...
)
(
Sg sgs
)

Examples

scope(failure) {writefln("Unittest failure :%s(%s)", __FILE__, __LINE__); stdout.flush();}
scope(success) {writefln("Unittest success :%s(%s)", __FILE__, __LINE__); stdout.flush();}

auto arr1 = 0.repeatStream,
     arr2 = [0, 1].repeatStream,
     arr3 = [0, 1, 2].repeatStream,
     arr4 = [0, 1, 2, 3].repeatStream;

auto slt = selector(arr1, arr2, arr3, arr4);
assert(slt.read(new int[4]) == [0, 0, 0, 0]);
slt.select(1); // or slt.select!1;
assert(slt.read(new int[4]) == [0, 1, 0, 1]);
slt.select(2); // or slt.select!2;
assert(slt.read(new int[4]) == [0, 1, 2, 0]);
slt.select(3); // or slt.select!3;
assert(slt.read(new int[4]) == [0, 1, 2, 3]);

Meta