Add errorOption example to Readme

Added example for errorOption conversion in Readme.
This commit is contained in:
Adam Uhlíř 2025-10-22 16:12:58 +02:00 committed by GitHub
parent 2e7f20392b
commit 2906828765
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,6 +226,7 @@ Any Result can be converted to an Option:
```nim
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