fold
fold<
S,A>(opt): <B>(onNone,onSome) => (s) =>B
Defined in: Core/Optional.ts:151
Extracts a value from an Optional focus using handlers for the present and absent cases.
Type Parameters
Section titled “Type Parameters”S
A
Parameters
Section titled “Parameters”Optional<S, A>
Returns
Section titled “Returns”<
B>(onNone,onSome): (s) =>B
Type Parameters
Section titled “Type Parameters”B
Parameters
Section titled “Parameters”onNone
Section titled “onNone”() => B
onSome
Section titled “onSome”(a) => B
Returns
Section titled “Returns”(
s):B
Parameters
Section titled “Parameters”S
Returns
Section titled “Returns”B