Lazy sequence generators and pipeline operators.

Types

Name

Description

Cast

Function object that constructs a Dest from a value.

ConstMemberFunction

Function object that calls a const member function of a class.

ExprIsConst

These exist because MSVC has problems with expression SFINAE in templates assignment and comparisons don't work properly without being pulled out of the template declaration

ExprIsMutable

SFINAE helper exposing whether Constness selects the mutable overload.

Field

Function object that accesses a data member of a class.

GenImpl

CRTP base for sequence generators that yield Value.

Get

Function object that extracts the nth element of a tuple‐like value.

Greater

Function object that compares two values with operator>.

Group

Groups the values of a sequence by a computed key.

Less

Function object that compares two values with operator<.

MemberFunction

Function object that calls a non‐const member function of a class.

MixedNewlines

EOL terms ("r", "n", or "rn").

Move

Function object that casts its argument to an rvalue reference.

Negate

Class and helper function for negating a boolean Predicate

Operator

CRTP base for pipeline operators applied to generators.

StreamSplitter

Outputs exactly the same bytes as the input stream, in different chunks. A chunk boundary occurs after each delimiter, or, if maxLength is non‐zero, after maxLength bytes, whichever comes first. Your callback can return false to stop consuming the stream at any time.

To

Function object that converts values to Dest via folly::to.

TryTo

Function object that converts values to Dest, returning an Expected.

VirtualGen

Polymorphic wrapper

VirtualGenMoveOnly

Move‐only polymorphic wrapper for a generator yielding Value.

Enums

Name

Description

MemberType

Selects the const or non‐const overload of a member accessor.

Functions

Name

Description

all

all() ‐ For determining whether all values in a sequence satisfy a predicate.

any

any() ‐ For determining if any value in a sequence satisfies a predicate.

appendTo

Appends each value of a sequence to an existing collection.

as

as overloads

assert_type

Asserts at compile time that the sequence yields the given value type.

byLine

Generates the lines of an input stream, one std::string at a time.

chunked

chunked overloads

contains

Determines whether a sequence contains a given value.

distinctBy

Keeps only the first value for each distinct selected key.

eachAs

Constructs a Dest from each value.

eachTo

Calls folly::to on each value, converting it to Dest.

eachToPair

eachToPair overloads

eachToTuple

eachToTuple overloads

eachTryTo

Calls folly::tryTo on each value, mapping to an Expected of Dest.

empty

Produces an empty sequence of the given value type.

field

Extracts a data member from each value.

filter

Keeps only values that satisfy the predicate.

foldl

Left‐folds a sequence into a single value from an initial seed.

from

from overloads

fromConst

Produces a sequence referencing the elements of a const container.

fromCopy

Produces a sequence holding copies of the elements of a container.

fromFile

fromFile overloads

generator

Wraps a source callable as a generator yielding Value.

get

Extracts the nth element of each tuple‐like value.

groupBy

Groups all values by their selected key.

groupByAdjacent

Groups consecutive values that share the same selected key.

guard

Wraps a pipeline so exceptions of a given type are passed to a handler.

interleave

Interleaves values from the source pipeline with those from source2.

just

Produces a sequence containing a single value.

lines

Split by EOL ("r", "n", or "rn").

map

Applies a function to each value, yielding the results.

mapOp

mapOp ‐ Given a generator of generators, maps the application of the given operator on to each inner gen. Especially useful in aggregating nested data structures:

mapped

Applies a function to each value, yielding the results.

maxBy

Finds the value with the maximum selected key.

member

member overloads

minBy

Finds the value with the minimum selected key.

negate

Creates a predicate that negates the result of pred.

orderBy

Orders values by their selected key using the given comparer.

orderByDescending

Orders values in descending order of their selected key.

parallel

parallel ‐ A parallelization operator.

pmap

Run pred in parallel in nThreads. Results are returned in the same order in which they were retrieved from the source generator (similar to map).

range

range overloads

reduce

Reduces a sequence to a single value using a binary reducer.

resplit

Split the output from a generator into StringPiece "lines" delimited by the given delimiter. Delimters are NOT included in the output.

seq

seq overloads

split

split overloads

streamSplitter

Creates a StreamSplitter, deducing the callback type.

sub

sub ‐ For sub‐summarization of a sequence.

takeWhile

Yields values while the predicate holds, then stops.

toFile

toFile overloads

unsplit

unsplit overloads

until

Yields values until the predicate holds, then stops.

unwrapOr

Unwraps an optional‐like value, using a fallback when it is empty.

visit

Applies a visitor to each value, passing values through unchanged.

Created with MrDocs