18 template<
typename Applicative>
21 template<
typename AF,
typename AV>
24 template<
template<
typename...>
class Applicative,
typename... Args,
typename T>
30 template<
typename Applicative,
typename T>
36 template<
typename AF,
typename AV>
42 template<
typename AF,
typename AV>
43 auto operator* (
const AF& af,
const AV& av) -> decltype (
GSL (af, av))
59 struct GSLResult<
std::optional<V>>
61 using Type_t = std::optional<std::result_of_t<T (const V&)>>;
65 static std::optional<U>
Pure (
const U& v)
80 template<
typename L,
typename R>
100 template<
typename AV>
106 return R_t::Left (
f.GetLeft ());
109 return R_t::Left (v.GetLeft ());
111 return R_t::Right (
f.GetRight () (v.GetRight ()));
std::optional< T > Type_t
static GSLResult_t< Type_t, AV > GSL(const Type_t &f, const AV &v)
std::optional< std::result_of_t< T(const V &)> > Type_t
constexpr detail::ExprTree< detail::ExprType::LeafStaticPlaceholder, detail::MemberPtrs< Ptr > > f
static GSLResult_t< Type_t, AV > GSL(const Type_t &f, const AV &v)
static Either Right(R &&r)
auto operator*(const AF &af, const AV &av) -> decltype(GSL(af, av))
typename InstanceApplicative< AF >::template GSLResult< AV >::Type_t GSLResult_t
auto Pure(const T &v) -> decltype(InstanceApplicative< Applicative >::Pure(v))
static std::optional< U > Pure(const U &v)
static Either< L, RP > Pure(const RP &v)
GSLResult_t< AF, AV > GSL(const AF &af, const AV &av)