-
Notifications
You must be signed in to change notification settings - Fork 429
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
Overload map() to support key paths #435
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wohoo
#if swift(>=3.2) | ||
it("should work with key paths") { | ||
let property = MutableProperty("foo") | ||
let mappedProperty = property.map(\.count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOVE IT
KeyPaths are the best thing ever. 💖 |
(Irrelevant to this PR) I hope the Swift gurus manage to get key path decomposition into 4.0. With it we can make 🙀🙀🙀🙀🙀🙀🙀 |
I don't think these tests are actually going to run on CI right now. But since we've updated Nimble, we should be able to run |
Happy to wait for #436 and rebase. |
or #437 😂 |
Ready to go 👍 |
🎉 |
We should be able to use key paths with
flatMap()
too, but this is a start.