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

How does `buildExpression` change what a result builder block can contain?

@resultBuilder struct HTMLBuilder { static func buildExpression(_ s: String) -> [String] { [s] } static func buildExpression(_ n: Int) -> [String] { ["#\(n)"] } static func buildBlock(_ parts: [String]...) -> [String] { parts.flatMap { $0 } } }