Updated README.md (#3)

This commit is contained in:
Anas Alhasani 2021-11-17 17:19:01 +02:00 committed by GitHub
parent c9924a8f38
commit 3bf9ed534e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ struct ContentView {
}
```
The forward-slash syntax you see above represents a [case path](https://github.com/pointfreeco/swift-case-path) to a particular case of an enum. Case paths are our imagining of what key paths could look like for enums, and every concept for key paths has an analogous concept for case paths:
The forward-slash syntax you see above represents a [case path](https://github.com/pointfreeco/swift-case-paths) to a particular case of an enum. Case paths are our imagining of what key paths could look like for enums, and every concept for key paths has an analogous concept for case paths:
* Each property of an struct is naturally endowed with a key path, and so each case of an enum is endowed with a case path.
* Key paths are constructed using a back slash, name of the type and name of the property (_e.g._, `\User.name`), and case paths are constructed similarly, but with a forward slash (_e.g._, `/Route.draft`).