[map](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.map) and [and_then](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.and_then) are two common combinators for `Result<T, E>` (also for `Option<T>`).
// The following now provides a much more helpful error message.
let tt = multiply("t", "2");
print(tt);
println!("Success!")
}
```
### Type alias
Using `std::result::Result<T, ParseIntError>` everywhere is verbose and tedious, we can use alias for this purpose.
At a module level, creating aliases can be particularly helpful. Errors found in the a specific module often has the same `Err` type, so a single alias can succinctly defined all associated `Results`. This is so useful even the `std` library even supplies one: [`io::Result`](https://doc.rust-lang.org/std/io/type.Result.html).
6. π
```rust,editable
use std::num::ParseIntError;
// FILL in the blank
type __;
// Use the above alias to refer to our specific `Result` type.
// Here, the alias again allows us to save some space.
fn print(result: Res<i32>) {
match result {
Ok(n) => println!("n is {}", n),
Err(e) => println!("Error: {}", e),
}
}
fn main() {
print(multiply("10", "2"));
print(multiply("t", "2"));
println!("Success!")
}
```
### Using Result in `fn main`
Typically `the` main function will look like this:
```rust
fn main() {
println!("Hello World!");
}
```
However `main` is also able to have a return type of `Result`. If an error occurs within the `main` function it will return an error code and print a debug representation of the error( Debug trait ).