Using Slices as OutputRange
You will get to know the use of slices as OutputRange in this lesson.
We'll cover the following...
The std.range
module makes slices OutputRange objects as well. In contrast, std.array
makes them only input ranges. Unfortunately, using slices as OutputRange objects has a confusing effect: Slices lose an element for each put()
operation on them; and that element is the one that has just been displayed!
The reason for this behavior is a consequence of slices’ not having a put()
member function. As a result, the third case of the ...