Skip to content
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

ValueObservation.compactMap #451

Merged
merged 11 commits into from
Dec 1, 2018
Merged

ValueObservation.compactMap #451

merged 11 commits into from
Dec 1, 2018

Conversation

groue
Copy link
Owner

@groue groue commented Dec 1, 2018

This PR introduces ValueObservation.compactMap, which notifies the non-nil results of a transformation applied to the notified elements of a base ValueObservation:

extension ValueObservation where Reducer: ValueReducer {
    func compactMap<T>(_ transform: @escaping (Reducer.Value) -> T?)
        -> ValueObservation<CompactMapValueReducer<Reducer, T>>
}

@groue groue merged commit 7c6c615 into development Dec 1, 2018
@groue groue deleted the feature/CompactMap branch December 1, 2018 20:03
@groue groue added this to the GRDB 3.6.0 milestone Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant