Template Function rsl::mbind(tl::expected<T, E> const&, Fn)

Function Documentation

template<typename T, typename E, typename Fn>
std::invoke_result_t<Fn, T> rsl::mbind(tl::expected<T, E> const &exp, Fn fn)

Monad tl::expected<T,E>.

Parameters:
  • exp – tl::expected<T,E> input

  • fn – Function to apply

Template Parameters:
  • T – Type for the input expected

  • E – Error type

  • Fn – Function

Returns:

Return type of the function