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