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

Given this result builder, what does `make` return?

@resultBuilder struct SumBuilder { static func buildBlock(_ parts: Int...) -> Int { parts.reduce(0, +) } static func buildOptional(_ part: Int?) -> Int { part ?? 0 } static func buildArray(_ parts: [Int]) -> Int { parts.reduce(0, +) } } @SumBuilder func make(_ flag: Bool) -> Int { 10 for i in 1...3 { i } if flag { 100 } } let r = make(false)