Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftresult buildersSingle-choice MCQ

Given this result builder, what is the type the compiler infers for the closure body before `buildBlock` runs, and what does `buildFinalResult` change?

@resultBuilder struct Joined { static func buildBlock(_ parts: String...) -> [String] { parts } static func buildFinalResult(_ parts: [String]) -> String { parts.joined(separator: ", ") } } func make(@Joined _ body: () -> String) -> String { body() } let s = make { "a"; "b"; "c" }