Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

List Generation

One of the most interesting capabilities of FC++ is the generation of infinite lazy lists which are evaluated only at need. The most simple example of this is

enum_from(1)

which returns the generator for integers 1,2,3,..... infinity.

take(4,enum_from(1))

returns a list of the first 4 of the list.

at(enum_from(1),3)

returns the fourth member using zero indexed access. Both of the lists returned are lazy and only evaluated when the list members are accessed.


PrevUpHomeNext