fold
fold<
A,B>(onNone,onSome): (data) =>B
Defined in: Core/Maybe.ts:152
Extracts the value from a Maybe by providing handlers for both cases.
Type Parameters
Section titled “Type Parameters”A
B
Parameters
Section titled “Parameters”onNone
Section titled “onNone”() => B
onSome
Section titled “onSome”(a) => B
Returns
Section titled “Returns”(
data):B
Parameters
Section titled “Parameters”Maybe<A>
Returns
Section titled “Returns”B