private Result<Unit> ApplyDiscountWhenAvailable(Option<string> discountCode) | |
{ | |
return discountCode.Match(Some: ApplyDiscount, | |
None: () => Unit.Default); | |
} | |
private Result<Unit> ApplyDiscount(string discountCode) | |
{ | |
//mimic applying discount code (whatever that means) | |
return Unit.Default; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment