From f4fe36f1bea93759aefed709095ec117e1500a5f Mon Sep 17 00:00:00 2001 From: Valentino Malvarmo <72671974+fighur@users.noreply.github.com> Date: Fri, 14 Apr 2023 20:32:55 -0500 Subject: [PATCH] Fix typo in ior.md --- docs/datatypes/ior.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/datatypes/ior.md b/docs/datatypes/ior.md index 843a30949a..aa57220b31 100644 --- a/docs/datatypes/ior.md +++ b/docs/datatypes/ior.md @@ -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"