Match.value
from
Match (effect)
値に対するマッチング
返り値は値
code:ts
const input: string | number = "some input"
const result = Match.value(input).pipe(
Match.when(Match.number, (n) =>
number: ${n}
),
Match.when(Match.string, (s) =>
string: ${s}
),
Match.exhaustive
)