The static side of Result: helpers that operate directly on bare leaves — no wrapping involved — and throw a ResultError when handed the wrong variant. They are the deliberate escape hatch out of the type-safe flow.
Result.unwrap(r) — the Ok value; throws on a Bad.Result.unwrapOnlyOk(r) — like unwrap, but
typed to accept only an Ok.Result.unwrapBad(r) — the Bad leaf; throws on
an Ok.Result.unwrapBadReason(r) — the failure's
reason tag.Result.unwrapBadValue(r) — the failure's
value payload.Result.matchBad(r, map) — dispatch on the tag,
one handler per reason, each seeing the payload typed for that tag.
Requires a Bad: narrow the Ok away first (a still-possible Ok is a
compile error at the call site).See 02 — Form validation (matchBad) and 04 — Domain operation for the toolkit in context.