Skip to content

Commit

Permalink
Update std.range.* docs.
Browse files Browse the repository at this point in the history
The previous docs were simply dissected from the original std.range docs, and
the text in each module is truncated and awkward to read. The main package.d
docs were also missing links to the submodules. So, update the docs to reflect
the current state of things.
  • Loading branch information
H. S. Teoh committed Dec 2, 2014
1 parent 54101e8 commit ad44c0b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
9 changes: 6 additions & 3 deletions std/range/interfaces.d
@@ -1,8 +1,11 @@
/**
These _range-construction tools are implemented using templates; but sometimes
an object-based interface for ranges is needed. For this purpose, this module
This module is a submodule of $(LINK2 std_range_package.html, std.range).
The main $(D std.range) module provides template-based tools for working with
ranges, but sometimes an object-based interface for ranges is needed, such as
when runtime polymorphism is required. For this purpose, this submodule
provides a number of object and $(D interface) definitions that can be used to
wrap around _range objects created by the above templates.
wrap around _range objects created by the $(D std.range) templates.
$(BOOKTABLE ,
$(TR $(TD $(D $(LREF InputRange)))
Expand Down
17 changes: 15 additions & 2 deletions std/range/package.d
Expand Up @@ -14,8 +14,21 @@ motivation behind them, see Andrei Alexandrescu's article
$(LINK2 http://www.informit.com/articles/printerfriendly.aspx?p=1407357&rll=1,
$(I On Iteration)).
A rich set of _range creation and composition templates are provided that let
you construct new ranges out of existing ranges:
Submodules:
This module has a few submodules:
The $(LINK2 std_range_primitives.html, $(D std._range.primitives)) submodule
provides basic _range functionality. It defines several templates for testing
whether a given object is a _range, what kind of _range it is, and provides
some common _range operations.
The $(LINK2 std_range_interfaces.html, $(D std._range.interfaces)) submodule
provides object-based interfaces for working with ranges via runtime
polymorphism.
The remainder of this module provides a rich set of _range creation and
composition templates that let you construct new ranges out of existing ranges:
$(BOOKTABLE ,
$(TR $(TD $(D $(LREF retro)))
Expand Down
12 changes: 7 additions & 5 deletions std/range/primitives.d
@@ -1,6 +1,9 @@
/**
This module defines several templates for testing whether a given object is a
_range, and what kind of _range it is:
This module is a submodule of $(LINK2 std_range_package.html, std.range).
It provides basic range functionality by defining several templates for testing
whether a given object is a _range, and what kind of _range it is:
$(BOOKTABLE ,
$(TR $(TD $(D $(LREF isInputRange)))
$(TD Tests if something is an $(I input _range), defined to be
Expand Down Expand Up @@ -30,7 +33,7 @@ $(BOOKTABLE ,
))
)
A number of templates are provided that test for various _range capabilities:
It also provides number of templates that test for various _range capabilities:
$(BOOKTABLE ,
$(TR $(TD $(D $(LREF hasMobileElements)))
Expand Down Expand Up @@ -68,8 +71,7 @@ $(BOOKTABLE ,
))
)
Finally, this module also defines some convenience functions for
manipulating ranges:
Finally, it includes some convenience functions for manipulating ranges:
$(BOOKTABLE ,
$(TR $(TD $(D $(LREF popFrontN)))
Expand Down

0 comments on commit ad44c0b

Please sign in to comment.