-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add an If-Then-Else operation to the Apply. #2609
Merged
Merged
Commits on Nov 13, 2018
-
Add an If-Then-Else operation to the Apply.
The `FlatMap` type-class includes a function `ifM`, which allows evaluating a Boolean computation and, depending on the result, choosing between one effectful computation or other. We add to the `Apply` type-class a very similar function. Although the function is similar to `ifM`, there is an important difference between them, as to how they handle the effect: - The `ifM` will run the effects of the condition `F[Boolean]`, followed by the effects of _only one_ of the branches. - The `ifA` will always run the effect of the condition, that of the first branch, and that of the second branch, in that order. Thus, the if-then-else part in `ifA` only applies to the inner values, not to the effects.
Configuration menu - View commit details
-
Copy full SHA for b52471e - Browse repository at this point
Copy the full SHA b52471eView commit details
Commits on Nov 14, 2018
-
Avoid adding methods to the type class.
To preserve binary compatibility, we can not add methods to an existing type-class, and can only use the syntax extension.
Configuration menu - View commit details
-
Copy full SHA for 75a7d4d - Browse repository at this point
Copy the full SHA 75a7d4dView commit details
Commits on Nov 22, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 8480c5a - Browse repository at this point
Copy the full SHA 8480c5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for fde754d - Browse repository at this point
Copy the full SHA fde754dView commit details
Commits on Nov 29, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 062d7fe - Browse repository at this point
Copy the full SHA 062d7feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 926423b - Browse repository at this point
Copy the full SHA 926423bView commit details
Commits on Jan 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 1d627c5 - Browse repository at this point
Copy the full SHA 1d627c5View commit details
Commits on Jan 12, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 2517183 - Browse repository at this point
Copy the full SHA 2517183View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.