October 2019
Intermediate to advanced
444 pages
10h 37m
English
Other than the Option type, a Result type can have two custom types, which means that Result provides additional information about the cause of the error. This is more expressive than returning Option, which returns a single type instance or None. However, this None instance can mean anything from failure to process to wrong input. This way, the Result type can be seen as a similar system as exceptions in other languages, but they are part of the regular workflow of a program. One example is a search, where a multitude of scenarios can happen:
How can you use the Result type effectively? Let's ...
Read now
Unlock full access