The value to yield.
import std.range; InputRange!int myIota = iota(10).inputRangeObject; myIota.popFront(); myIota.popFront(); assert(myIota.moveFront == 2); assert(myIota.front == 2); myIota.popFront(); assert(myIota.front == 3); //can be assigned to std.range.interfaces.InputRange directly myIota = new Generator!int( { foreach (i; 0 .. 10) yield(i); }); myIota.popFront(); myIota.popFront(); assert(myIota.moveFront == 2); assert(myIota.front == 2); myIota.popFront(); assert(myIota.front == 3); size_t[2] counter = [0, 0]; foreach (i, unused; myIota) counter[] += [1, i]; assert(myIota.empty); assert(counter == [7, 21]);
Yields a value of type T to the caller of the currently executing generator.