Defined in Call signatures Return value A monadic type of the same kind Examples struct Error final std string what fn expected<double Error> ex 12 1 auto rounded ex | fn and_then auto&& v > fn expected<unsigned Error> return static_cast<unsigned> std ceil v 0 5 REQUIRE rounded value 13u The resulting value is because does not contain an and therefore is called 13 ex Error and_then struct Error final std string what fn expected<double Error> ex std unexpected<Error> Not good auto oops ex | fn and_then auto&& v > fn expected<unsigned Error> return static_cast<unsigned> std ceil v 0 5 Not called because ex contains an Error REQUIRE oops error what Not good The result is an because already contained an and therefore is not called Error ex Error and_then Execute a function on the value of the monadic type if the value is present Use through the fn and_then nielbloid Execute a function on the value of the monadic type if the value is present return A functor that will execute the function on the value fn auto && The function to execute on the value