pointfreeco / swift-case-paths

🧰 Case paths extends the key path hierarchy to enum cases.
https://www.pointfree.co/collections/enums-and-structs/case-paths
MIT License
904 stars 105 forks source link

Add case path for optional chaining #141

Closed stephencelis closed 8 months ago

stephencelis commented 8 months ago

While #139/#140 added support for flattening optionals, this PR adds support for chaining into optionals. This is useful for when an API takes a case key path to an optional value, but you want to chain into another value and keep things optional.