proxygen
|
#include <Base-inl.h>
Public Member Functions | |
Reduce ()=default | |
Reduce (Reducer reducer) | |
template<class Source , class Value , class StorageType = typename std::decay<Value>::type> | |
Optional< StorageType > | compose (const GenImpl< Value, Source > &source) const |
Public Member Functions inherited from folly::gen::Operator< Reduce< Reducer > > | |
ResultGen | compose (const GenImpl< Value, Source > &source) const |
Public Member Functions inherited from folly::gen::FBounded< Self > | |
const Self & | self () const |
Self & | self () |
Private Attributes | |
Reducer | reducer_ |
Additional Inherited Members | |
Protected Member Functions inherited from folly::gen::Operator< Reduce< Reducer > > | |
Operator ()=default | |
Operator (Operator &&) noexcept=default | |
Operator (const Operator &)=default | |
Operator & | operator= (Operator &&) noexcept=default |
Operator & | operator= (const Operator &)=default |
Reduce - Functional reduce, for recursively combining values from a source using a reducer function until there is only one item left. Useful for combining values when an empty sequence doesn't make sense.
This type is primarily used through the 'reduce' helper method, like:
sring longest = from(names) | reduce([](string&& best, string& current) { return best.size() >= current.size() ? best : current; });
Definition at line 2099 of file Base-inl.h.
|
default |
|
inlineexplicit |
|
inline |
Definition at line 2110 of file Base-inl.h.
References folly::Optional< Value >::get_pointer(), folly::gen::move, and v.
|
private |
Definition at line 2100 of file Base-inl.h.