1. kimagure

    No comment

    kimagure
Changes in body
Source | HTML | Preview
@@ -6,12 +6,11 @@
data V err result
```
The Validation package gives us a nice way to validate values using applicative validation. From the docs:
-> Applicative validation differs from monadic validation using Either in that it allows us to collect
-multiple errors using a Semigroup, whereas Either terminates on the first error.
+> Applicative validation differs from monadic validation using Either in that it allows us to collect multiple errors using a Semigroup, whereas Either terminates on the first error.
In other words, modeling validations with Either would fall out on the first error. We can collect one or more errors in this case using a structure that is an instance of Semigroup.
Note that this does not work with a Monoid. Using a Monoid would not make sense in that it would provide an identity that cannot reasonably be used -- there is no case in which you would have an empty list of errors and fall on the error case of the validation.