Aller au contenu principal

chain()

const chain: <A, B>(f) => (ma) => Option<B> = flatMap

Alias for flatMap.

Chains a function that returns an Option over the value.


Type Parameters

A: A

The input type.

B: B

The output type.


Parameters

f: (a) => Option<B>

The chaining function.


Returns

A function that transforms the Option.


Since

2.0.0