arrow-validation / arrow.validation / Refinement

Refinement

interface Refinement<F, A>

Functions

applicativeError abstract fun applicativeError(): ApplicativeError<F, Nel<RefinedPredicateException>>
invalidValueMsg abstract fun invalidValueMsg(a: A): String
refine open fun refine(value: A): Kind<F, A>
open fun <B> refine(value: A, f: (A) -> B): Kind<F, B>
refine2 open fun <B> refine2(a: A, b: A, f: (Tuple2<A, A>) -> B): Kind<F, B>
refine3 open fun <B> refine3(a: A, b: A, c: A, f: (Tuple3<A, A, A>) -> B): Kind<F, B>
refine4 open fun <B> refine4(a: A, b: A, c: A, d: A, f: (Tuple4<A, A, A, A>) -> B): Kind<F, B>
refinement abstract fun A.refinement(): Boolean
refineSequence open fun <G> refineSequence(value: Kind<G, A>, traverse: Traverse<G>): Kind<F, Kind<G, A>>
refineSequenceList open fun refineSequenceList(elements: List<A>): Kind<F, List<A>>
refineTraverse open fun <G, B> refineTraverse(value: Kind<G, A>, traverse: Traverse<G>, f: (A) -> B): Kind<F, Kind<G, B>>
refineTraverseList open fun <B> refineTraverseList(elements: List<A>, f: (A) -> B): Kind<F, List<B>>

Inheritors

Greater Greater defines a subset of Numbers wich are greater than min.interface Greater<F, A : Number> : Refinement<F, A>
GreaterEqual GreaterEqual defines a subset of Numbers which are greater or equal than mininterface GreaterEqual<F, A : Number> : Refinement<F, A>
Less Less defines a subset of Numbers which are less than maxinterface Less<F, A : Number> : Refinement<F, A>
LessEqual LessEqual defines a subset of Numbers which are less or equal than maxinterface LessEqual<F, A : Number> : Refinement<F, A>
Negative Negative defines a subset of all negative Numbers (this is x < 0)interface Negative<F, A : Number> : Refinement<F, A>
NonEmpty NonEmpty<A> defines a subtype of As which are non empty.interface NonEmpty<F, A> : Refinement<F, A>
NonNegative NonNegative defines a subset of all Numbers which are non negative (this is x >= 0)interface NonNegative<F, A : Number> : Refinement<F, A>
NonPositive NonPositive defines a subset of all numbers which are non positive (this is x <= 0)interface NonPositive<F, A : Number> : Refinement<F, A>
NonZero NonZero defines a subset of Numbers which are not 0interface NonZero<F, A : Number> : Refinement<F, A>
Not interface Not<F, B> : Refinement<F, B>
Positive Positive defines a subset of all numbers which are positive (this is x > 0)interface Positive<F, A : Number> : Refinement<F, A>

Do you like Arrow?

Arrow Org
<