Skip to main content

Wrapper types

There are many different way a failure is represented using a wrapper type. Arrow strives to provide a uniform approach by using different builder functions (such as the either build for the Either wrapper type).

In this section you can find a reference of the different wrapper types supported by Arrow and sister libraries. Also, you can find more information about particular wrapper types, and how to choose between them.

TypeFailureAdditional states?Lives in
A?nullNo (stdlib)
Option<A>NoneNo (core)
Result<A>Failure contains a Throwable,
inspection possible at runtime
No (stdlib)
Either<E, A>Left contains value of type ENo (core)
Ior<E, A>Left contains value of type ESimultaneous success and
failure using Both
(core)
Result<A, E>Failure contains value of type ENoResult4k
Outcome<E, A>Failure contains value of type EAbsent valueQuiver
Progressive
Outcome<E, A>
Failure contains value of type EIncomplete valuePedestal State