-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Implements flatmap #44792
Merged
Merged
Implements flatmap #44792
Commits on Apr 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 49e0cfc - Browse repository at this point
Copy the full SHA 49e0cfcView commit details -
Implements flatmap and iteration methods for Some and Nothing
flatmap is the composition of map and flatten. It is important for functional programming patterns. Some tasks that can be easily attained with list-comprehensions, including the composition of filter and mapping, or flattening a list of computed lists, can only be attained with do-syntax style if a flatmap functor is available. (Or appending a `|> flatten`, etc.) Filtering can be implemented by outputing empty lists or singleton lists for the values to be removed or kept. A more proper approach would be the optional monad, though, usually implemented in Julia as a union of Some and Nothing. This patch therefore also implements iteration methods for Some and Nothing, to enable the filtermap pattern with flatmap.
Configuration menu - View commit details
-
Copy full SHA for 69f4bd8 - Browse repository at this point
Copy the full SHA 69f4bd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b005a9 - Browse repository at this point
Copy the full SHA 1b005a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2f1523 - Browse repository at this point
Copy the full SHA f2f1523View commit details -
Configuration menu - View commit details
-
Copy full SHA for dde1f9c - Browse repository at this point
Copy the full SHA dde1f9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a53a103 - Browse repository at this point
Copy the full SHA a53a103View commit details -
Configuration menu - View commit details
-
Copy full SHA for ddda481 - Browse repository at this point
Copy the full SHA ddda481View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38fa2e3 - Browse repository at this point
Copy the full SHA 38fa2e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for a69552f - Browse repository at this point
Copy the full SHA a69552fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bff01b - Browse repository at this point
Copy the full SHA 5bff01bView commit details
Commits on Apr 6, 2022
-
Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e73af27 - Browse repository at this point
Copy the full SHA e73af27View commit details -
Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e9947bc - Browse repository at this point
Copy the full SHA e9947bcView commit details -
Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 705017f - Browse repository at this point
Copy the full SHA 705017fView commit details -
Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a720be0 - Browse repository at this point
Copy the full SHA a720be0View 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.