match()
match<
A,B>(onNone,onSome): (ma) =>B
Pattern matches on an Option.
Type Parametersβ
A: Aβ
The value type.
B: Bβ
The return type.
Parametersβ
onNone: () => Bβ
Handler for None case.
onSome: (a) => Bβ
Handler for Some case.
Returnsβ
A function that matches the Option.
Sinceβ
2.0.0