mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-03 22:33:07 +00:00
Add errorOption example to Readme
Added example for errorOption conversion in Readme.
This commit is contained in:
parent
2e7f20392b
commit
2906828765
@ -226,6 +226,7 @@ Any Result can be converted to an Option:
|
|||||||
|
|
||||||
```nim
|
```nim
|
||||||
let converted = works().option # equals @[1, 1, 2, 2, 2].some
|
let converted = works().option # equals @[1, 1, 2, 2, 2].some
|
||||||
|
let errOption = fails().errorOption # option that is set when the Result holds an error
|
||||||
```
|
```
|
||||||
|
|
||||||
[1]: https://nim-lang.org/docs/options.html
|
[1]: https://nim-lang.org/docs/options.html
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user