arrow-refined-types / arrow.refinement / Constraints

Constraints

typealias Constraints = List<Pair<Boolean, String>>

Constrains are represented by a list of pairs of Boolean and String where the boolean value represents if the predicate succeeded and the string value represent the error message if it failed.

import arrow.refinement.ensure

ensure(true to "must be true")
// [(true, must be true)]

Do you like Arrow?

Arrow Org
<