-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement @tryswitch #132
Implement @tryswitch #132
Conversation
Codecov Report
@@ Coverage Diff @@
## master #132 +/- ##
==========================================
+ Coverage 81.94% 82.63% +0.68%
==========================================
Files 26 26
Lines 1523 1589 +66
==========================================
+ Hits 1248 1313 +65
- Misses 275 276 +1
Continue to review full report at Codecov.
|
since the PR is submitted here, maybe just have it in MLStyle? Expronicon is for meta-programming not the general case of pattern matching. |
@Roger-luo A minor issue here is the implementation reuses |
I'd merge this now. Changes can be applied later. Thanks @serenity4 ! |
Ah, then we can just reuse the few lines of code for |
Implements
@tryswitch
as an extension to@switch
where match failures are silent.As mentioned in #131 we can move this implementation into a 3rd party library, but I think it is also convenient to have it alongside MLStyle.