chain
chain<
E,A,B>(f): (data) =>These<E,B>
Defined in: Core/These.ts:154
Chains These computations by passing the success value to f.
- Err propagates unchanged.
- Ok(a) applies f(a) directly.
- Both(e, a): applies f(a); if the result is Ok(b), returns Both(e, b) to preserve the warning. Otherwise returns f(a) as-is.
Type Parameters
Section titled “Type Parameters”E
A
B
Parameters
Section titled “Parameters”(a) => These<E, B>
Returns
Section titled “Returns”(
data):These<E,B>
Parameters
Section titled “Parameters”These<E, A>
Returns
Section titled “Returns”These<E, B>