Skip to content

Commit

Permalink
Merge pull request #4423 from fighur/main
Browse files Browse the repository at this point in the history
Fix typo in `Ior` docs
  • Loading branch information
armanbilge authored Apr 15, 2023
2 parents bcbc056 + f4fe36f commit 37980d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/datatypes/ior.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ val left = "Error".leftIor
```


When we look at the `Monad` or `Applicative` instances of `Ior`, we can see that they actually requires a `Semigroup` instance on the left side.
When we look at the `Monad` or `Applicative` instances of `Ior`, we can see that they actually require a `Semigroup` instance on the left side.
This is because `Ior` will actually accumulate failures on the left side, very similar to how the [`Validated`](validated.md) data type does.
This means we can accumulate data on the left side while also being able to short-circuit upon the first left-side-only value.
For example, sometimes, we might want to accumulate warnings together with a valid result and only halt the computation on a "hard error"
Expand Down

0 comments on commit 37980d5

Please sign in to comment.