Aller au contenu principal

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