In this chapter, we will investigate the concept of ranges, which is used throughout the D code. We'll look at the following recipes:
Using ranges when implementing an algorithm
Creating an input range
Creating an output range
Creating a higher-order range
Putting a range interface on a collection
Creating an input range over a tree structure
Using runtime polymorphic (class) ranges
Storing a range as a data member
Sorting ranges efficiently
Searching ranges
Using functional tools to query data