chain.hpp
Go to the documentation of this file.
auto state_wrapper_data(TagT tag, T &&s, D &&) -> decltype(state_wrapper_data(tag, std::forward< T >(s)))
Utility function for easy overloading of state_traits::data for state wrappers with a specific tag...
Definition: state_wrapper.hpp:173
constexpr auto chain(InputRangeTs &&...rs) -> decltype(chainr(std::forward< InputRangeTs >(rs)...))
Alias for chainr
Definition: chain.hpp:105
#define ABL_DECLTYPE_RETURN(body_expr)
Utility for defining generic functions with a deduced return type, that are composed of a single expr...
Definition: utils.hpp:109
auto state_unwrap(T &&s) -> decltype(state_traits_t< T >::unwrap(std::forward< T >(s)))
Convenience function for calling state_traits::unwrap
Definition: state_traits.hpp:136
auto constantly(T &&value) -> constantly_t< estd::decay_t< T > >
Similar to clojure.core/constantly.
Definition: constantly.hpp:56
auto with_state(StateT &&st, UnwrappedFn &&, WrappedFn &&fn) -> meta::lazy_enable_if_t< !std::is_same< estd::decay_t< StateT >, estd::decay_t< decltype(state_complete(st))> >::value, std::result_of< WrappedFn(StateT)> >
Given a value st that represents the state of a reduction, this function generically dispatches to th...
Definition: with_state.hpp:58
constexpr auto chainl(InputRangeT &&r) -> chainl_t< estd::decay_t< InputRangeT > >
Transducer produces the sequence passed as parameter before processing the first input.
Definition: chain.hpp:163
auto state_data(T &&s, D &&d) -> decltype(state_traits_t< T >::data(std::forward< T >(s), std::forward< D >(d)))
Convenience function for calling state_traits::data
Definition: state_traits.hpp:127
constexpr auto range(StopT &&stop) -> decltype(comp( count(), take(std::forward< StopT >(stop))))
Generator transducer version of Python range
Definition: range.hpp:42
Utility to write simple transducers easily.
Definition: transducer_impl.hpp:60
auto state_complete(T &&s) -> decltype(state_traits_t< T >::complete(std::forward< T >(s)))
Convenience function for calling state_traits::complete
Definition: state_traits.hpp:110
auto reduce_nested(ReducingFnT &&step, StateT &&state, InputRangeTs &&...ranges) -> decltype(detail::is_non_empty(ranges...) ?call(detail::reduce_nested_non_empty_flipped, std::forward< StateT >(state), std::forward< ReducingFnT >(step), std::forward< InputRangeTs >(ranges)...) :skip(std::forward< StateT >(state)))
Similar to reduce, but does not unwrap reduced values.
Definition: reduce_nested.hpp:63
auto wrap_state(StateT &&next, DataT &&data=DataT{}) -> state_wrapper< TagT, estd::decay_t< StateT >, estd::decay_t< DataT > >
Given a tag TagT and a state next and associated data, returns a state_wrapper instance.
Definition: state_wrapper.hpp:104
constexpr auto chainr(InputRangeT &&r) -> chainr_t< estd::decay_t< InputRangeT > >
Transducer produces the sequence passed as parameter after all other input has finished.
Definition: chain.hpp:87
auto state_wrapper_complete(TagT, T &&s) -> decltype(state_complete(state_unwrap(std::forward< T >(s))))
Utility function for easy overloading of state_traits::complete for state wrappers with a specific ta...
Definition: state_wrapper.hpp:123