various result types
Swift ⟩ Attributes ⟩ Result Builders ⟩
typealias Component = String
// result type: String
static func buildFinalResult(_ component: Component) -> String {
return component
}
// result type: Int
static func buildFinalResult(_ component: Component) -> Int {
return component.count
}
Last updated
Was this helpful?