unwrapOr
unwrapOr returns the success value, or the provided fallback when the result is an error.
ts
ok(1).unwrapOr(2) // 1
err<string, number>('error').unwrapOr(2) // 2Signature:
ts
unwrapOr(value: T): TUse unwrapOr when the fallback is cheap to create.