arrow-refined-types / arrow.refinement / constraints

constraints

fun <A> constraints(refined: Refined<A, *>, value: A): Constraints

Validates value obtaining the resolved Constraints for the refined predicate

import arrow.refinement.numbers.PositiveInt
import arrow.refinement.constraints

constraints(PositiveInt, -1)
// [(false, -1 should be > 0)]

Do you like Arrow?

Arrow Org
<