Skip to main content

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