Skip to content

0.4.1

Compare
Choose a tag to compare
@ustitc ustitc released this 07 May 15:25
· 28 commits to main since this release

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()