Skip to content

match

match<S, A>(opt): <B>(cases) => (s) => B

Defined in: Core/Optional.ts:168

Pattern matches on an Optional focus using a named-case object.

S

A

Optional<S, A>

<B>(cases): (s) => B

B

() => B

(a) => B

(s): B

S

B

pipe(
  profile,
  Optional.match(bioOpt)({ none: () => "no bio", some: (bio) => bio }),
);