Package-level declarations
Extensions of built-in types (e.g. Either
, Option
, etc)
Types
Functions
The Validated type doesn't natively support flatMap because of the monad laws that it breaks. But this is what flatMap would do if it were allowed. We've called it concatMap because the Kotlin compiler will want to wire in the Monad flatMap extension instead and confusion reigns.
Constructs a flattened list without Nones
Applies a function that produces an Option to a NonEmptyList. The result is None if the resulting list would be empty, otherwise Some(NonEmptyList).
Returns a list containing only the non-None results of applying the given transform function to each element in the original collection.
Map a function that returns an Either across the NonEmptyList.
Map a function that returns an Option across the NonEmptyList.
Returns an Either of a list of B results of applying the given transform function to each element(A) in the original collection.
Given a mapping function and an error message, return either the result of the function in a ValidNel if the function completes successfully, or the error message in an InvalidNel.
Retry a suspended supplier of an ErrorOr until a maximum number of times or a predicate has been fulfilled.
Retry a suspended supplier until a maximum number of times or a predicate has been fulfilled.