Aller au contenu principal

fold()

const fold: <A, B>(onNone, onSome) => (ma) => B = match

Alias for match.

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