- Adds
<A, B> Iterable<A>.traverse(f: (A) -> Result<B>): Result<List<B>>
(Chris Myers) - Adds
<A, B> Iterable<A>.traverseResult(f: (A) -> Result<B>): Result<List<B>>
(Chris Myers)
- Adds
outcomeOf{}
Raise DSL which allows for greater interoperability with Result<Option> and ErrorOr (Chris Myers)
- Adds
<A> OutcomeOf<A>.asResult(): Result<Option<A>>
(Chris Myers) - Adds
<T> Result<Option<T>>.toOutcomeOf(): OutcomeOf<T>
(Chris Myers) - Adds
<A> Arb.Companion.result(error: Throwable, value: Arb<A>): Arb<Result<A>>
(Chris Myers) - Adds
Arb.Companion.outcomeOf(error: Throwable, value: Arb<A>): Arb<OutcomeOf<A>>
(Chris Myers)
- Adds
Either<A, B>.handleErrorWith(f: (A) -> Either<C, B>): Either<C, B>
(Chris Myers)
- Adds
Result<T>.handleFailureWith(f: (Throwable) -> Result<T>): Result<T>
(Chris Myers) - Adds
<T> Result<T>.toOutcome(): OutcomeOf<T>
(Chris Myers) - Adds
<A, B: Throwable> Option<A>.toResult(error: () -> B): Result<A>
(Chris Myers)
- Adds
Result<T>.isSuccess(predicate: (T) -> Boolean): Boolean
andResult<T>.isFailure(predicate: (Throwable) -> Boolean): Boolean
(Jem Mawson)
- Adds
Result<T>.unit(): Result<Unit>
as alias for.map { }
(Jem Mawson) - Adds
Result<T>.tap
andResult<T>.flatTap
(Jem Mawson) - Adds
Result<T>.toOutcome
(Jem Mawson)
- Adds
Result.catch
to enable the same behaviour asEither.catch
(Alejandro Metke) - Adds
Result<Result<T>>.flatten(): Result<T>
(Jem Mawson)
T.failure(): Result<T>
was invalid. Changed toThrowable.failure(): Result<A>
(Jem Mawson)
- Adds
T.success()
as a shorthand for creating a successResult
(Jem Mawson) - Adds
<T : Throwable>.failure()
as a shorthand for creating a failureResult
(Jem Mawson) - Adds
T.toResult()
as a shorthand for converting nullable types toResult<T>
(Alejandro Metke) - Adds
Result.mapFailure()
to enable mapping the failure in a result to a differentThrowable
(Alejandro Metke) - Backport traverse functions on Either, Iterable and Option (Andrew Parker)
- Backport traverse functions on Sequence, Map and Ior (Andrew Parker)
- Adds
ErrorOr.toResult()
as a shorthand for convertingEither<Throwable, T>
toResult<T>
(Jem Mawson)
Upgraded Arrow to v1.2.4
- Adds
Option.ifPresent()
as alternative toOption.forEach()
for symmetry withOption.ifAbsent()
(Mia Balogh)
- Lazy version of
or
:Option.or(() -> Option<T>)
(Chris Myers) - Adds
Option.orEmpty()
(Milly Rowett) - Backport traverse functions on NonEmptyList (Andrew Parker)
- Deprecated
Option.or(Option)
in favour ofOption.or(() -> Option<T>)
(Chris Myers)
Option.or(Option)
(Mehdi Mollaverdi)
- Bumped Arrow to v1.2.0 from v1.2.0-RC (Jem Mawson)
kotlin.Result.toEither()
(Jem Mawson)validateNotNull
extension function on nullable values (Hugo Müller-Downing)
- Add Either.traverse (Simon Vergauwen)
- Either, Nullable & Ior zip (Simon Vergauwen)
- Adds validateNotNull extension function on nullable values (Hugo Müller-Downing)
- Fix outcome traverse (Simon Vergauwen)
- Fix nested nullable issue (Simon Vergauwen)
- Fix nested null bug (#22) (Simon Vergauwen)
Option.unit()
andEither.unit()
to replace thevoid()
method deprecated by Arrow.withRetries
method on suspended supplier functions to provide opinionated access to Arrow'sSchedule
.