Navigating Phobos
Although there are range-based functions in many modules in Phobos, the focus of this section is on those found in std.range
, std.algorithm
, and std.array
. The functions in these modules are often central to composable pipelines. We aren't going to cover all of them, just enough to give you a taste of what is possible and where to find the functions you might need. An in-depth treatment of these modules would span more pages than we have room for.
Note
Note that while many of the functions in these modules are usable in function pipelines, some of them are not, either because they have a return type of void, or they do not take a range as the first parameter. Although this chapter is focused on composable pipelines, we will still take a look at a few of these misfit functions as they can be quite useful to initialize a range before pipelining or to do something with the result of a pipeline.
std.range
The std.range
package exposes two modules, std.range.interfaces
and std.range...