0.4.1
Turn refinements into lazy monads ⭐
Refined
turning into a Refinement
monad 👾
Now the base type value can be retrieved by calling getOrThrow
, getOrError
, getOrElse
, getOrNull
. It also can be transformed as Collections/Either/Ior with map
and flatMap
functions
Deprecate Refined ⌛
The refined
function is deprecated:
"Krefty" refined NotBlank() // eagerly convert to Refined or throw exception
Now refine
and get*
functions must be called instead:
val refined = "Krefty" refine NotBlank()
refined.getOrThrow()