Functional wrapper for values to facilitate pipelined transformations. More...
#include <kumi/functional/monadic.hpp>
Functional wrapper for values to facilitate pipelined transformations.
kumi::function::foldable provides a lightweight wrapper that enables functional-style chaining of operations using the >> and << operators. It acts as an identity functor, allowing a value to be transformed through a sequence of callables without manual temporary variables.
| T | Type of the value stored inside kumi::foldable. |
Public Member Functions | |
| constexpr auto | operator() () const noexcept |
| Finalizes the fold. | |
Friends | |
| template<typename C> | |
| constexpr decltype(auto) | operator<< (C &&c, foldable &&f) |
| Pipelines the value contained in the foldable into a unary callable, chaining computation from right to left. | |
| template<typename C> | |
| constexpr decltype(auto) | operator>> (foldable &&f, C &&c) |
| Pipelines the value contained in the foldable into a unary callable, chaining computation from left to right. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<typename T> | |
| foldable (T &&t) -> foldable< std::unwrap_ref_decay_t< T > > | |
| kumi::function::foldable deduction guide | |