Range primitives
Range primitives
Range primitives
Access to maximal length of the range. Note: the actual length of the range depends on the underlying range. If it has fewer elements, it will stop before maxLength is reached.
Range primitives
User accessible in read and write
array range
import nxt.dynamic_array : SA = DynamicArray; import std.traits : isIterable; import std.range.primitives : isInputRange; alias C = SA!int; auto cs = C([11, 13].s).intoUniqueRange; alias CS = typeof(cs); static assert(isInputRange!(typeof(cs))); static assert(isIterable!(typeof(cs))); assert(cs.front == 11); cs.popFront(); assert(cs.front == 13); cs.popFront(); assert(cs.empty);