ekmett / ekmett/either

Assert function

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
60
Forks
35
PR merge metrics
No merged PRs in 30d

Description

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:.

```haskell
assert :: Bool -> e -> Validation e ()
assert True _ = Success ()
assert False e = Failure e
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.