either icon indicating copy to clipboard operation
either copied to clipboard

Assert function

Open jonathanlking opened this issue 5 years ago • 0 comments

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

jonathanlking avatar Oct 22 '19 17:10 jonathanlking