Chapter 6. Understanding Ranges
Since they were first introduced, ranges have become a pervasive part of D. It's possible to write D code and never need to create any custom ranges or algorithms yourself, but it helps tremendously to understand what they are, where they are used in Phobos, and how to get from a range to an array or another data structure. If you intend to use Phobos, you're going to run into them eventually. Unfortunately, some new D users have a difficult time understanding and using ranges.
The aim of this chapter and the next is to present ranges and functional style in D from the ground up, so the you can see they aren't some arcane secret understood only by a chosen few. Then, you can start writing idiomatic D early on in ...
Get Learning D now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.