either
either copied to clipboard
Assert function
I've been using the following function quite a lot recently - I'm happy to open a PR if you agree it's useful (feel free to close otherwise) :slightly_smiling_face:.
assert :: Bool -> e -> Validation e ()
assert True _ = Success ()
assert False e = Failure e