![]() |
LeechCraft 0.6.70-17335-ge406ffdcaf
Modular cross-platform feature rich live environment.
|
#include "functor.h"
Public Types | |
template<typename F> | |
using | FmapResult_t = Either<L, std::invoke_result_t<F, R>> |
using | UndefinedTag |
using | FmapResult_t |
The type of the functor after its elements were mapped by the function F. | |
Static Public Member Functions | |
template<typename F> | |
static FmapResult_t< F > | Apply (const Either< L, R > &either, const F &f) |
static FmapResult_t< F > | Apply (const Either< L, R > &functor, const F &function) |
Applies the function to the each of the elements inside the functor. | |
using LC::Util::InstanceFunctor< Either< L, R > >::FmapResult_t |
The type of the functor after its elements were mapped by the function F.
This type should correspond to the return type of the Apply() function when passed this functor and a function of type F.
F | The type of the function to apply to the elements inside this functor. |
using LC::Util::InstanceFunctor< Either< L, R > >::FmapResult_t = Either<L, std::invoke_result_t<F, R>> |
using LC::Util::InstanceFunctor< Either< L, R > >::UndefinedTag |
|
inlinestatic |
Definition at line 242 of file functor.h.
References LC::Util::Either< L, R >::GetLeft(), LC::Util::Either< L, R >::GetRight(), LC::Util::Either< L, R >::IsLeft(), LC::Util::Either< L, std::invoke_result_t< F, R > >::Left(), and LC::Util::Either< L, std::invoke_result_t< F, R > >::Right().
|
static |
Applies the function to the each of the elements inside the functor.
[in] | functor | The functor whose values are subject to function. |
[in] | function | The function that should be applied to the values in the functor. |
F | The type of the function to apply to the elements in the function. |