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

What does this key-path-as-function usage produce?

struct P { let name: String; let age: Int } let people = [P(name: "Ann", age: 30), P(name: "Bo", age: 25)] let names = people.map(\.name)