Skip to content

[stdlib] Add flatMap example in Result.swift #32115

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

Merged
merged 2 commits into from
Jun 4, 2020

Conversation

eunjiChung
Copy link

@eunjiChung eunjiChung commented May 31, 2020

Use this method when you need to transform the value of a Result instance even though it produces a nested result type. In this example, note the difference in the result of using map and flatMap with a transformation that returns an result type.

@CodaFi CodaFi requested review from natecook1000 and xwu June 1, 2020 18:50
Copy link
Member

@natecook1000 natecook1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving these docs, @eunjiChung! Just a couple notes below.

@natecook1000
Copy link
Member

@swift-ci Please smoke test and merge

@eunjiChung
Copy link
Author

@swift-ci Please smoke test

1 similar comment
@natecook1000
Copy link
Member

@swift-ci Please smoke test

@swift-ci swift-ci merged commit 66311e1 into swiftlang:master Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants