foldW()
constfoldW: <B,A,C>(onNone,onSome) => (ma) =>B|C=matchW
Alias for matchW.
Pattern matches on an Option with widened return types.
Type Parametersβ
B: Bβ
The return type for None.
A: Aβ
The value type.
C: Cβ
The return type for Some.
Parametersβ
onNone: () => Bβ
Handler for None case.
onSome: (a) => Cβ
Handler for Some case.
Returnsβ
A function that matches the Option.
Sinceβ
2.0.0