Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftKeyPath expressionsSingle-choice MCQ

Given `\Person.name` (type `KeyPath<Person, String>`) and `\String.count`, how do you compose them into a single key path from `Person` to `Int`?

struct Person { var name: String } let nameKP = \Person.name let countKP = \String.count