Skip to content

Commit

Permalink
Merge pull request #36 from bogoware/MrBogomips-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
MrBogomips authored Dec 23, 2024
2 parents a2a7525 + 42b1b3f commit bbce860
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ and may need to resort to a procedural style to achieve their goals.
These methods should be used sparingly, as they deviate from the functional paradigm and make the code less
robust, potentially leading to unexpected exceptions:

* `ThrowIfFailure`: Throws an exception if the operation fails. It is typically used to terminate the execution of the pipeline
* `ThrowIfFailure()`: Throws an exception if the operation fails. It is typically used to terminate the execution of the pipeline
discarding the result of the operation.
* `GetValueOrThrow`: Extracts the value from the `Result<T>` monad.
* `GetErrorOrThrow`: Extracts the error from the `Result<T>` monad.
* `Value` or `GetValueOrThrow()`: Extracts the value from the `Result<T>` monad.
* `Error` or `GetErrorOrThrow()`: Extracts the error from the `Result<T>` monad.

By adhering to the `Result<T>` monad, code can be modeled in a more readable and reasoned manner.
It also contributes to writing more robust code with reduced error-proneness.
Expand Down Expand Up @@ -250,4 +250,4 @@ var result = Maybe
.Bind(ValidateValue)
.Bind(UpdateValue);

```
```

0 comments on commit bbce860

Please sign in to comment.