Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.