fix typo in README

This commit is contained in:
ericLemanissier
2017-12-04 12:32:06 +01:00
committed by GitHub
parent dfe53ac8bb
commit 7cf765e356

View File

@@ -49,7 +49,7 @@ The interface is the same as `std::expected` as proposed in [p0323r3](http://www
* `tl::expected<std::size_t,std::error_code> s = exp_string.map(&std::string::size);`
- `map_error`: carries out some operation on the unexpected object if there is one.
* `my_error_code translate_error (std::error_code);`
* `tl::expected<int,my_error_code> s = exp_int.map(translate_error);`
* `tl::expected<int,my_error_code> s = exp_int.map_error(translate_error);`
- `and_then`: like `map`, but for operations which return a `tl::expected`.
* `tl::expected<ast, fail_reason> parse (const std::string& s);`
* `tl::expected<ast, fail_reason> exp_ast = exp_string.and_then(parse);`